diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2017-09-15 09:23:59 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2017-09-15 09:23:59 +0200 |
commit | 41315cebe1d0a074445f28d915d7d038dea80465 (patch) | |
tree | 28ebd5626ac0750bef7b8a2696c61e29a6512a08 | |
parent | 1eb75229e02e5bd678f1a99eae9a6062330ecb46 (diff) | |
parent | 37d4b1f14ebc692efe9a2744946ba2bfd8ccf6d3 (diff) | |
download | gnunet-41315cebe1d0a074445f28d915d7d038dea80465.tar.gz gnunet-41315cebe1d0a074445f28d915d7d038dea80465.zip |
Merge remote-tracking branch 'origin/master' into identity_abe
55 files changed, 4671 insertions, 2459 deletions
@@ -48,6 +48,7 @@ These are the direct dependencies for running GNUnet: | |||
48 | - libogg >= 1.3.0 (optional for experimental conversation tool) | 48 | - libogg >= 1.3.0 (optional for experimental conversation tool) |
49 | - python-zbar >= 0.10 (optional for gnunet-qr) | 49 | - python-zbar >= 0.10 (optional for gnunet-qr) |
50 | - TeX Live >= 2012 (optional for gnunet-bcd) | 50 | - TeX Live >= 2012 (optional for gnunet-bcd) |
51 | - Texinfo Tested with version 6.3 | ||
51 | - libglpk >= 4.45 (optional for experimental code) | 52 | - libglpk >= 4.45 (optional for experimental code) |
52 | 53 | ||
53 | Recommended autotools for compiling the SVN version are: | 54 | Recommended autotools for compiling the SVN version are: |
diff --git a/contrib/Makefile.am b/contrib/Makefile.am index 9ce4b019d..07cff424c 100644 --- a/contrib/Makefile.am +++ b/contrib/Makefile.am | |||
@@ -48,6 +48,7 @@ EXTRA_DIST = \ | |||
48 | no_forcestart.conf \ | 48 | no_forcestart.conf \ |
49 | no_autostart_above_core.conf \ | 49 | no_autostart_above_core.conf \ |
50 | coverage.sh \ | 50 | coverage.sh \ |
51 | nssswitch.conf \ | ||
51 | report.sh \ | 52 | report.sh \ |
52 | terminate.py.in \ | 53 | terminate.py.in \ |
53 | gnunet_pyexpect.py.in \ | 54 | gnunet_pyexpect.py.in \ |
diff --git a/contrib/nssswitch.conf b/contrib/nssswitch.conf new file mode 100644 index 000000000..89af6471e --- /dev/null +++ b/contrib/nssswitch.conf | |||
@@ -0,0 +1,25 @@ | |||
1 | # /etc/nsswitch.conf | ||
2 | # Modified to support GNUnet's GNS (.gnu, .zkey etc) | ||
3 | # Compare with your distributions' "nsswitch.conf" file. | ||
4 | |||
5 | passwd: compat | ||
6 | shadow: compat | ||
7 | group: compat | ||
8 | |||
9 | # passwd: db files nis | ||
10 | # shadow: db files nis | ||
11 | # group: db files nis | ||
12 | |||
13 | hosts: files gns [NOTFOUND=return] dns | ||
14 | networks: files dns | ||
15 | |||
16 | services: db files | ||
17 | protocols: db files | ||
18 | rpc: db files | ||
19 | ethers: db files | ||
20 | netmasks: files | ||
21 | netgroup: files | ||
22 | bootparams: files | ||
23 | |||
24 | automount: files | ||
25 | aliases: files \ No newline at end of file | ||
diff --git a/contrib/packages/guix/README b/contrib/packages/guix/README new file mode 100644 index 000000000..0b66e500a --- /dev/null +++ b/contrib/packages/guix/README | |||
@@ -0,0 +1,39 @@ | |||
1 | package definitions for GNU Guix | ||
2 | --------------------------------- | ||
3 | |||
4 | Usage | ||
5 | ----- | ||
6 | |||
7 | Just point Guix towards the root of this source tree: | ||
8 | |||
9 | export GUIX_PACKAGE_PATH=/path/to/packages | ||
10 | or (if you are in the root of the gnunet git repository): | ||
11 | guix package -L contrib/packages/guix/packages -i package-name | ||
12 | |||
13 | The packages in this repository will take precedence over those in the | ||
14 | official distribution. | ||
15 | |||
16 | To make use of the packages in your GuixSD config file: | ||
17 | |||
18 | Be sure to have GUIX_PACKAGE_PATH for your shell exported, | ||
19 | for bash this could be achieved like this: | ||
20 | |||
21 | export GUIX_PACKAGE_PATH="/full/path/to/gnunet/contrib/packages/guix/directory" | ||
22 | |||
23 | In the section of your systems "config.scm", you should find | ||
24 | something like this: | ||
25 | |||
26 | (use-modules (gnu) (gnu system nss)) | ||
27 | |||
28 | Now to make use of "gnunetg" as an systemwide installed package we change this | ||
29 | to: | ||
30 | |||
31 | (use-modules (gnu) (gnu system nss) | ||
32 | (gnunet packages gnunet)) | ||
33 | |||
34 | and do the usual thing: | ||
35 | - save | ||
36 | - guix system build /etc/config.scm | ||
37 | - sudo -E guix system reconfigure /etc/config.scm | ||
38 | |||
39 | The "-E" in "sudo -E" is important! | ||
diff --git a/contrib/packages/guix/gnunet-doc.scm b/contrib/packages/guix/gnunet-doc.scm new file mode 100644 index 000000000..a2a9a2393 --- /dev/null +++ b/contrib/packages/guix/gnunet-doc.scm | |||
@@ -0,0 +1,165 @@ | |||
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 | ||
5 | ;;; it under the terms of the GNU General Public License as published | ||
6 | ;;; by the Free Software Foundation; either version 3, or (at your | ||
7 | ;;; 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 | ;;; General Public License for more details. | ||
13 | ;;; | ||
14 | ;;; You should have received a copy of the GNU General Public License | ||
15 | ;;; along with GNUnet; see the file COPYING. If not, write to the | ||
16 | ;;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | ;;; Boston, MA 02110-1301, USA. | ||
18 | ;;; | ||
19 | |||
20 | (use-modules | ||
21 | (ice-9 popen) | ||
22 | (ice-9 match) | ||
23 | (ice-9 rdelim) | ||
24 | (guix packages) | ||
25 | (guix build-system gnu) | ||
26 | (guix gexp) | ||
27 | ((guix build utils) #:select (with-directory-excursion)) | ||
28 | (guix git-download) | ||
29 | (guix utils) ; current-source-directory | ||
30 | (gnu packages) | ||
31 | (gnu packages aidc) | ||
32 | (gnu packages autotools) | ||
33 | (gnu packages backup) | ||
34 | (gnu packages base) | ||
35 | (gnu packages compression) | ||
36 | (gnu packages curl) | ||
37 | (gnu packages databases) | ||
38 | (gnu packages file) | ||
39 | (gnu packages gettext) | ||
40 | (gnu packages glib) | ||
41 | (gnu packages gnome) | ||
42 | (gnu packages gnunet) | ||
43 | (gnu packages gnupg) | ||
44 | (gnu packages gnuzilla) | ||
45 | (gnu packages groff) | ||
46 | (gnu packages gstreamer) | ||
47 | (gnu packages gtk) | ||
48 | (gnu packages guile) | ||
49 | (gnu packages image) | ||
50 | (gnu packages image-viewers) | ||
51 | (gnu packages libidn) | ||
52 | (gnu packages libunistring) | ||
53 | (gnu packages linux) | ||
54 | (gnu packages maths) | ||
55 | (gnu packages multiprecision) | ||
56 | (gnu packages perl) | ||
57 | (gnu packages pkg-config) | ||
58 | (gnu packages pulseaudio) | ||
59 | (gnu packages python) | ||
60 | (gnu packages tex) | ||
61 | (gnu packages texinfo) | ||
62 | (gnu packages tex) | ||
63 | (gnu packages tls) | ||
64 | (gnu packages video) | ||
65 | (gnu packages web) | ||
66 | (gnu packages xiph) | ||
67 | ((guix licenses) #:prefix license:)) | ||
68 | |||
69 | (define %source-dir (string-append (current-source-directory) | ||
70 | "/../../../")) | ||
71 | |||
72 | (define gnunet-doc | ||
73 | (let* ((revision "1") | ||
74 | (select? (delay (or (git-predicate | ||
75 | (string-append (current-source-directory) | ||
76 | "/../../../")) | ||
77 | source-file?)))) | ||
78 | (package | ||
79 | (name "gnunet-doc") | ||
80 | (version (string-append "0.10.1-" revision "." "dev")) | ||
81 | (source | ||
82 | (local-file ;;"../../.." | ||
83 | ;;%source-dir | ||
84 | ;;(string-append (getcwd) "/../../../") | ||
85 | (string-append (getcwd)) ;drrty hack and this assumes one static position FIXME! | ||
86 | #:recursive? #t)) | ||
87 | ;;#:select? (git-predicate %source-dir))) | ||
88 | ;;#:select? (force select?))) | ||
89 | (build-system gnu-build-system) | ||
90 | (inputs | ||
91 | `(("glpk" ,glpk) | ||
92 | ("gnurl" ,gnurl) | ||
93 | ("gstreamer" ,gstreamer) | ||
94 | ("gst-plugins-base" ,gst-plugins-base) | ||
95 | ("gnutls" ,gnutls) ;Change to gnutls/dane once it is merged. | ||
96 | ("libextractor" ,libextractor) | ||
97 | ("libgcrypt" ,libgcrypt) | ||
98 | ("libidn" ,libidn) | ||
99 | ("libmicrohttpd" ,libmicrohttpd) | ||
100 | ("libltdl" ,libltdl) | ||
101 | ("libunistring" ,libunistring) | ||
102 | ("openssl" ,openssl) | ||
103 | ("opus" ,opus) | ||
104 | ("pulseaudio" ,pulseaudio) | ||
105 | ("sqlite" ,sqlite) | ||
106 | ("postgresql" ,postgresql) | ||
107 | ("mysql" ,mysql) | ||
108 | ("zlib" ,zlib) | ||
109 | ("perl" ,perl) | ||
110 | ("python" ,python) ; tests and gnunet-qr | ||
111 | ("jansson" ,jansson) | ||
112 | ("nss" ,nss) | ||
113 | ("glib" ,glib "bin") | ||
114 | ("gmp" ,gmp) | ||
115 | ("bluez" ,bluez) ; for optional bluetooth feature | ||
116 | ("glib" ,glib) | ||
117 | ;;("texlive-minimal" ,texlive-minimal) ; optional. | ||
118 | ("texlive" ,texlive) | ||
119 | ("libogg" ,libogg))) | ||
120 | (native-inputs | ||
121 | `(("pkg-config" ,pkg-config) | ||
122 | ("autoconf" ,autoconf) | ||
123 | ("automake" ,automake) | ||
124 | ("gnu-gettext" ,gnu-gettext) | ||
125 | ("texinfo" ,texinfo) | ||
126 | ("libtool" ,libtool))) | ||
127 | (arguments | ||
128 | `(#:tests? #f ;Don't run tests | ||
129 | #:phases | ||
130 | (modify-phases %standard-phases | ||
131 | (add-after 'unpack 'autoconf | ||
132 | (lambda _ | ||
133 | (substitute* "bootstrap" | ||
134 | (("contrib/pogen.sh") "sh contrib/pogen.sh")) | ||
135 | (for-each (lambda (f) (chmod f #o755)) | ||
136 | (find-files "po" "")) | ||
137 | (zero? (system* "sh" "bootstrap")))) | ||
138 | (replace 'build | ||
139 | (lambda _ | ||
140 | (chdir "doc") | ||
141 | (zero? (system* "make" "doc-all-give-me-the-noise")))) | ||
142 | (replace 'install | ||
143 | (lambda* (#:key outputs #:allow-other-keys) | ||
144 | (let* ((out (assoc-ref outputs "out")) | ||
145 | (doc (string-append out "/share/doc/gnunet"))) | ||
146 | (mkdir-p doc) | ||
147 | (mkdir-p (string-append doc "/gnunet")) | ||
148 | (install-file "gnunet.pdf" doc) | ||
149 | (install-file "gnunet.info" doc) | ||
150 | (copy-recursively "gnunet" | ||
151 | (string-append doc | ||
152 | "/gnunet")) | ||
153 | (install-file "gnunet-c-tutorial.pdf" doc) | ||
154 | (install-file "gnunet-c-tutorial.info" doc) | ||
155 | (copy-recursively "gnunet-c-tutorial" | ||
156 | (string-append doc | ||
157 | "/gnunet-c-tutorial"))) | ||
158 | #t))))) | ||
159 | (synopsis "Documentation of GNUnet") | ||
160 | (description | ||
161 | "GNUnet documentation build") | ||
162 | (license (list license:fdl1.3+ license:gpl3+)) | ||
163 | (home-page "https://gnunet.org/")))) | ||
164 | |||
165 | gnunet-doc | ||
diff --git a/guix-env.scm b/contrib/packages/guix/guix-env.scm index 54731858e..6946fee57 100644 --- a/guix-env.scm +++ b/contrib/packages/guix/guix-env.scm | |||
@@ -32,14 +32,12 @@ | |||
32 | ;; development setup for this setup, which involves a version of Guile in | 32 | ;; development setup for this setup, which involves a version of Guile in |
33 | ;; your PATH. | 33 | ;; your PATH. |
34 | ;; | 34 | ;; |
35 | ;; cd contrib/packages/guix | ||
35 | ;; guix build -f guix-env.scm | 36 | ;; guix build -f guix-env.scm |
36 | ;; | 37 | ;; |
37 | ;; We'd like to provide advanced functions such as guix environment specific | 38 | ;; We'd like to provide advanced functions such as guix environment specific |
38 | ;; gnunet-git package and usage of gnunet-gtk-git, but this is subject | 39 | ;; gnunet-git package and usage of gnunet-gtk-git, but this is subject |
39 | ;; to tests right now. | 40 | ;; to tests right now. |
40 | ;; | ||
41 | ;; Further versions of GNUnet for Guix can currently be found in | ||
42 | ;; https://gitweb.krosos.org/ng0_guix/packages.git/ | ||
43 | 41 | ||
44 | (use-modules | 42 | (use-modules |
45 | (ice-9 popen) | 43 | (ice-9 popen) |
@@ -50,6 +48,7 @@ | |||
50 | (guix gexp) | 48 | (guix gexp) |
51 | ((guix build utils) #:select (with-directory-excursion)) | 49 | ((guix build utils) #:select (with-directory-excursion)) |
52 | (guix git-download) | 50 | (guix git-download) |
51 | (guix utils) ; current-source-directory | ||
53 | (gnu packages) | 52 | (gnu packages) |
54 | (gnu packages aidc) | 53 | (gnu packages aidc) |
55 | (gnu packages autotools) | 54 | (gnu packages autotools) |
@@ -82,29 +81,40 @@ | |||
82 | (gnu packages python) | 81 | (gnu packages python) |
83 | (gnu packages tex) | 82 | (gnu packages tex) |
84 | (gnu packages texinfo) | 83 | (gnu packages texinfo) |
84 | (gnu packages tex) | ||
85 | (gnu packages tls) | 85 | (gnu packages tls) |
86 | (gnu packages video) | 86 | (gnu packages video) |
87 | (gnu packages web) | 87 | (gnu packages web) |
88 | (gnu packages xiph) | 88 | (gnu packages xiph) |
89 | ((guix licenses) #:prefix license:)) | 89 | ((guix licenses) #:prefix license:)) |
90 | 90 | ||
91 | (define %source-dir (dirname (current-filename))) | 91 | (define %source-dir (string-append (current-source-directory) |
92 | "/../../../")) | ||
92 | 93 | ||
93 | (define gnunet-git | 94 | (define gnunet-git |
94 | (let* ((revision "1")) | 95 | (let* ((revision "3") |
95 | (package | 96 | (select? (delay (or (git-predicate |
97 | (string-append (current-source-directory) | ||
98 | "/../../../")) | ||
99 | source-file?)))) | ||
100 | (package | ||
96 | (name "gnunet-git") | 101 | (name "gnunet-git") |
97 | (version (string-append "0.10.1-" revision "." "dev")) | 102 | (version (string-append "0.10.1-" revision "." "dev")) |
98 | (source | 103 | (source |
99 | (local-file %source-dir | 104 | (local-file ;;"../../.." |
105 | ;;%source-dir | ||
106 | ;;(string-append (getcwd) "/../../../") | ||
107 | (string-append (getcwd)) ;drrty hack and this assumes one static position FIXME! | ||
100 | #:recursive? #t)) | 108 | #:recursive? #t)) |
109 | ;;#:select? (git-predicate %source-dir))) | ||
110 | ;;#:select? (force select?))) | ||
101 | (build-system gnu-build-system) | 111 | (build-system gnu-build-system) |
102 | (inputs | 112 | (inputs |
103 | `(("glpk" ,glpk) | 113 | `(("glpk" ,glpk) |
104 | ("gnurl" ,gnurl) | 114 | ("gnurl" ,gnurl) |
105 | ("gstreamer" ,gstreamer) | 115 | ("gstreamer" ,gstreamer) |
106 | ("gst-plugins-base" ,gst-plugins-base) | 116 | ("gst-plugins-base" ,gst-plugins-base) |
107 | ("gnutls" ,gnutls) | 117 | ("gnutls" ,gnutls) ;Change to gnutls/dane once it is merged. |
108 | ("libextractor" ,libextractor) | 118 | ("libextractor" ,libextractor) |
109 | ("libgcrypt" ,libgcrypt) | 119 | ("libgcrypt" ,libgcrypt) |
110 | ("libidn" ,libidn) | 120 | ("libidn" ,libidn) |
@@ -122,12 +132,14 @@ | |||
122 | ("python" ,python) ; tests and gnunet-qr | 132 | ("python" ,python) ; tests and gnunet-qr |
123 | ("jansson" ,jansson) | 133 | ("jansson" ,jansson) |
124 | ("nss" ,nss) | 134 | ("nss" ,nss) |
135 | ("glib" ,glib "bin") | ||
125 | ("gmp" ,gmp) | 136 | ("gmp" ,gmp) |
126 | ("bluez" ,bluez) ; for optional bluetooth feature | 137 | ("bluez" ,bluez) ; for optional bluetooth feature |
127 | ("glib" ,glib) | 138 | ("glib" ,glib) |
128 | ;; There are currently no binary substitutes for texlive on | 139 | ;; There are currently no binary substitutes for texlive on |
129 | ;; hydra.gnu.org or its mirrors due to its size. Uncomment if you need it. | 140 | ;; hydra.gnu.org or its mirrors due to its size. Uncomment if you need it. |
130 | ;;("texlive-minimal" ,texlive-minimal) ; optional. | 141 | ;;("texlive-minimal" ,texlive-minimal) ; optional. |
142 | ("texlive" ,texlive) | ||
131 | ("libogg" ,libogg))) | 143 | ("libogg" ,libogg))) |
132 | (native-inputs | 144 | (native-inputs |
133 | `(("pkg-config" ,pkg-config) | 145 | `(("pkg-config" ,pkg-config) |
@@ -141,7 +153,7 @@ | |||
141 | (outputs '("out" "debug")) | 153 | (outputs '("out" "debug")) |
142 | (arguments | 154 | (arguments |
143 | `(#:configure-flags | 155 | `(#:configure-flags |
144 | (list (string-append "--with-nssdir=" %output "/lib") | 156 | (list (string-append "--with-nssdir=" %output "/lib");"/lib/gnunet/nss") |
145 | "--enable-gcc-hardening" | 157 | "--enable-gcc-hardening" |
146 | "--enable-linker-hardening" | 158 | "--enable-linker-hardening" |
147 | 159 | ||
@@ -165,6 +177,14 @@ | |||
165 | (add-after 'patch-bin-sh 'bootstrap | 177 | (add-after 'patch-bin-sh 'bootstrap |
166 | (lambda _ | 178 | (lambda _ |
167 | (zero? (system* "sh" "bootstrap")))) | 179 | (zero? (system* "sh" "bootstrap")))) |
180 | ;; (add-after 'install 'install-lib-nss | ||
181 | ;; (lambda* (#:key outputs #:allow-other-keys) | ||
182 | ;; (let* ((out (assoc-ref outputs "out")) | ||
183 | ;; (lib (string-append out "/lib/nss/"))) | ||
184 | ;; (mkdir-p lib) | ||
185 | ;; (copy-recursively "src/gns/nss/" lib) | ||
186 | ;; (install-file "ping" "combobreak")) | ||
187 | ;; #t)) | ||
168 | (delete 'check)))) | 188 | (delete 'check)))) |
169 | ;; XXX: https://gnunet.org/bugs/view.php?id=4619 | 189 | ;; XXX: https://gnunet.org/bugs/view.php?id=4619 |
170 | ;; (add-after 'install 'set-path-for-check | 190 | ;; (add-after 'install 'set-path-for-check |
diff --git a/contrib/packages/guix/packages/gnunet/packages/gnunet.scm b/contrib/packages/guix/packages/gnunet/packages/gnunet.scm new file mode 100644 index 000000000..7840705a6 --- /dev/null +++ b/contrib/packages/guix/packages/gnunet/packages/gnunet.scm | |||
@@ -0,0 +1,474 @@ | |||
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 | ||
5 | ;;; it under the terms of the GNU General Public License as published | ||
6 | ;;; by the Free Software Foundation; either version 3, or (at your | ||
7 | ;;; 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 | ;;; General Public License for more details. | ||
13 | ;;; | ||
14 | ;;; You should have received a copy of the GNU General Public License | ||
15 | ;;; along with GNUnet; see the file COPYING. If not, write to the | ||
16 | ;;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
17 | ;;; Boston, MA 02110-1301, USA. | ||
18 | |||
19 | (define-module (gnunet packages gnunet) | ||
20 | #:use-module (guix build-system gnu) | ||
21 | #:use-module (guix download) | ||
22 | #:use-module (guix git-download) | ||
23 | #:use-module ((guix licenses) #:prefix license:) | ||
24 | #:use-module (guix packages) | ||
25 | #:use-module (gnu packages) | ||
26 | #:use-module (gnu packages admin) | ||
27 | #:use-module (gnu packages aidc) | ||
28 | #:use-module (gnu packages autotools) | ||
29 | #:use-module (gnu packages bison) | ||
30 | #:use-module (gnu packages compression) | ||
31 | #:use-module (gnu packages databases) | ||
32 | #:use-module (gnu packages gettext) | ||
33 | #:use-module (gnu packages glib) | ||
34 | #:use-module (gnu packages gnome) | ||
35 | #:use-module (gnu packages gnunet) | ||
36 | #:use-module (gnu packages gnupg) | ||
37 | #:use-module (gnu packages gnuzilla) | ||
38 | #:use-module (gnu packages gstreamer) | ||
39 | #:use-module (gnu packages gtk) | ||
40 | #:use-module (gnu packages libidn) | ||
41 | #:use-module (gnu packages libunistring) | ||
42 | #:use-module (gnu packages linux) | ||
43 | #:use-module (gnu packages man) | ||
44 | #:use-module (gnu packages image-viewers) | ||
45 | #:use-module (gnu packages maths) | ||
46 | #:use-module (gnu packages multiprecision) | ||
47 | #:use-module (gnu packages ncurses) | ||
48 | #:use-module (gnu packages pcre) | ||
49 | #:use-module (gnu packages perl) | ||
50 | #:use-module (gnu packages pkg-config) | ||
51 | #:use-module (gnu packages pulseaudio) | ||
52 | #:use-module (gnu packages python) | ||
53 | #:use-module (gnu packages tls) | ||
54 | #:use-module (gnu packages texinfo) | ||
55 | #:use-module (gnu packages tex) | ||
56 | #:use-module (gnu packages upnp) | ||
57 | #:use-module (gnu packages web) | ||
58 | #:use-module (gnu packages xiph)) | ||
59 | |||
60 | ;; TODO: Use HEAD without checking sum of it. | ||
61 | ;; Explanation for name scheme: UNIXPATH is capped at 108 characters, | ||
62 | ;; this causes lots of tests to fail. | ||
63 | (define-public gnunetg | ||
64 | (let* ((commit "b005d5e4dac03fcfdabf0d0de434da3b295f6d63") | ||
65 | (revision "30")) | ||
66 | (package | ||
67 | (inherit gnunet) | ||
68 | (name "gnunetg") | ||
69 | (version (string-append "0.10.1" "-" revision | ||
70 | "." (string-take commit 7))) | ||
71 | (source | ||
72 | (origin | ||
73 | (method git-fetch) | ||
74 | (uri (git-reference | ||
75 | (url "https://gnunet.org/git/gnunet.git") | ||
76 | (commit commit))) | ||
77 | (file-name (string-append name "-" version "-checkout")) | ||
78 | (sha256 | ||
79 | (base32 | ||
80 | "10wfb58pi55399cw100vplq3f8nxg2vl6sywcmvkx3wg1d3firla")))) | ||
81 | (build-system gnu-build-system) | ||
82 | (inputs | ||
83 | `(("glpk" ,glpk) | ||
84 | ("gnurl" ,gnurl) | ||
85 | ("gstreamer" ,gstreamer) | ||
86 | ("gst-plugins-base" ,gst-plugins-base) | ||
87 | ("gnutls" ,gnutls) | ||
88 | ("libextractor" ,libextractor) | ||
89 | ("libgcrypt" ,libgcrypt) | ||
90 | ("libidn" ,libidn) | ||
91 | ("libmicrohttpd" ,libmicrohttpd) | ||
92 | ("libltdl" ,libltdl) | ||
93 | ("libunistring" ,libunistring) | ||
94 | ("openssl" ,openssl) | ||
95 | ("opus" ,opus) | ||
96 | ("pulseaudio" ,pulseaudio) | ||
97 | ("sqlite" ,sqlite) | ||
98 | ("zlib" ,zlib) | ||
99 | ("perl" ,perl) | ||
100 | ("python" ,python-2) ; tests and gnunet-qr | ||
101 | ("jansson" ,jansson) | ||
102 | ("ncurses" ,ncurses) | ||
103 | ("nss" ,nss) | ||
104 | ("gmp" ,gmp) | ||
105 | ("miniupnpc" ,miniupnpc) | ||
106 | ("bluez" ,bluez) ; for optional bluetooth feature | ||
107 | ("glib" ,glib) | ||
108 | ;; ("texlive-minimal" ,texlive-minimal) ; optional. | ||
109 | ("libogg" ,libogg))) | ||
110 | (native-inputs | ||
111 | `(("pkg-config" ,pkg-config) | ||
112 | ("autoconf" ,autoconf) | ||
113 | ("automake" ,automake) | ||
114 | ("gnu-gettext" ,gnu-gettext) | ||
115 | ("texinfo" ,texinfo) | ||
116 | ("libtool" ,libtool))) | ||
117 | (outputs '("out" "debug")) | ||
118 | (arguments | ||
119 | `(#:configure-flags | ||
120 | (list (string-append "--with-nssdir=" %output "/lib") | ||
121 | "--enable-experimental") | ||
122 | #:parallel-tests? #f ; parallel building is not functional | ||
123 | #:tests? #f ; FAIL: test_gnunet_statistics.py | ||
124 | #:phases | ||
125 | ;; swap check and install phases and set paths to installed bin | ||
126 | (modify-phases %standard-phases | ||
127 | (add-after 'unpack 'patch-bin-sh | ||
128 | (lambda _ | ||
129 | (substitute* "bootstrap" | ||
130 | (("contrib/pogen.sh") "sh contrib/pogen.sh")) | ||
131 | (for-each (lambda (f) (chmod f #o755)) | ||
132 | (find-files "po" "")) | ||
133 | #t)) | ||
134 | (add-after 'patch-bin-sh 'bootstrap | ||
135 | (lambda _ | ||
136 | (zero? (system* "sh" "bootstrap")))) | ||
137 | ;; DISABLED until failing testcases are fixed. | ||
138 | ;; this test fails in our environment, disable it: | ||
139 | ;; XXX: specify which ones fail. | ||
140 | ;; (add-after 'patch-bin-sh 'disable-test_quota_compliance_tcp_asymmetric | ||
141 | ;; (lambda _ | ||
142 | ;; (substitute* '("src/transport/Makefile.am") | ||
143 | ;; (("test_quota_compliance_tcp_asymmetric") "")))) | ||
144 | ;; (("test_quota_compliance_http_asymmetric") "") | ||
145 | ;; (("test_quota_compliance_https_asymmetric") "") | ||
146 | ;; (("test_quota_compliance_unix") "") | ||
147 | ;; (("test_quota_compliance_unix_asymmetric") "")))) | ||
148 | ;; check is between build and install, fix this to: | ||
149 | ;; build - install - check, else the test suite fails. | ||
150 | (delete 'check))))))) | ||
151 | ;; (add-after 'install 'set-path-for-check | ||
152 | ;; (lambda* (#:key outputs #:allow-other-keys) | ||
153 | ;; (let* ((out (assoc-ref outputs "out")) | ||
154 | ;; (bin (string-append out "/bin")) | ||
155 | ;; (lib (string-append out "/lib"))) | ||
156 | ;; (setenv "GNUNET_PREFIX" lib) | ||
157 | ;; (setenv "PATH" (string-append (getenv "PATH") ":" bin)) | ||
158 | ;; ;; XXX: https://gnunet.org/bugs/view.php?id=4619#c11061 | ||
159 | ;; ;; Enable core dump before the tests. | ||
160 | ;; ;; XXX: HOW??? ulimit -c unlimited | ||
161 | ;; (zero? (system* "make" "check")))))))) | ||
162 | |||
163 | (define-public gnunet-doc | ||
164 | (package | ||
165 | (name "gnunet-doc") | ||
166 | (version (package-version gnunetg)) | ||
167 | (source (package-source gnunetg)) | ||
168 | (build-system gnu-build-system) | ||
169 | ;; FIXME: Introduce DOCS_ONLY option for configure script. | ||
170 | ;; This should prevent the checks for all required software. | ||
171 | (inputs | ||
172 | `(("glpk" ,glpk) | ||
173 | ("gnurl" ,gnurl) | ||
174 | ("gstreamer" ,gstreamer) | ||
175 | ("gst-plugins-base" ,gst-plugins-base) | ||
176 | ("gnutls" ,gnutls) | ||
177 | ("libextractor" ,libextractor) | ||
178 | ("libgcrypt" ,libgcrypt) | ||
179 | ("libidn" ,libidn) | ||
180 | ("libmicrohttpd" ,libmicrohttpd) | ||
181 | ("libltdl" ,libltdl) | ||
182 | ("libunistring" ,libunistring) | ||
183 | ("openssl" ,openssl) | ||
184 | ("opus" ,opus) | ||
185 | ("pulseaudio" ,pulseaudio) | ||
186 | ("sqlite" ,sqlite) | ||
187 | ("zlib" ,zlib) | ||
188 | ("perl" ,perl) | ||
189 | ("python" ,python-2) ; tests and gnunet-qr | ||
190 | ("jansson" ,jansson) | ||
191 | ("ncurses" ,ncurses) | ||
192 | ("nss" ,nss) | ||
193 | ("gmp" ,gmp) | ||
194 | ("miniupnpc" ,miniupnpc) | ||
195 | ("bluez" ,bluez) ; for optional bluetooth feature | ||
196 | ("glib" ,glib) | ||
197 | ("texlive" ,texlive) ;TODO: Use a minimal subset. | ||
198 | ("libogg" ,libogg))) | ||
199 | (native-inputs | ||
200 | `(("pkg-config" ,pkg-config) | ||
201 | ("autoconf" ,autoconf) | ||
202 | ("automake" ,automake) | ||
203 | ("gnu-gettext" ,gnu-gettext) | ||
204 | ("texinfo" ,texinfo) | ||
205 | ("libtool" ,libtool))) | ||
206 | (arguments | ||
207 | `(#:tests? #f ;Don't run tests | ||
208 | #:phases | ||
209 | (modify-phases %standard-phases | ||
210 | (add-after 'unpack 'patch-bin-sh | ||
211 | (lambda _ | ||
212 | (substitute* "bootstrap" | ||
213 | (("contrib/pogen.sh") "sh contrib/pogen.sh")) | ||
214 | (for-each (lambda (f) (chmod f #o755)) | ||
215 | (find-files "po" "")) | ||
216 | #t)) | ||
217 | (add-after 'patch-bin-sh 'bootstrap | ||
218 | (lambda _ | ||
219 | (zero? (system* "sh" "bootstrap")))) | ||
220 | (replace 'build | ||
221 | (lambda _ | ||
222 | (chdir "doc") | ||
223 | (zero? (system* "make" "doc-all-give-me-the-noise")))) | ||
224 | (replace 'install | ||
225 | (lambda* (#:key outputs #:allow-other-keys) | ||
226 | (let* ((out (assoc-ref outputs "out")) | ||
227 | (doc (string-append out "/share/doc/gnunet"))) | ||
228 | (mkdir-p doc) | ||
229 | (mkdir-p (string-append doc "/gnunet")) | ||
230 | (install-file "gnunet.pdf" doc) | ||
231 | (install-file "gnunet.info" doc) | ||
232 | (copy-recursively "gnunet" | ||
233 | (string-append doc | ||
234 | "/gnunet")) | ||
235 | (install-file "gnunet-c-tutorial.pdf" doc) | ||
236 | (install-file "gnunet-c-tutorial.info" doc) | ||
237 | (copy-recursively "gnunet-c-tutorial" | ||
238 | (string-append doc | ||
239 | "/gnunet-c-tutorial"))) | ||
240 | #t))))) | ||
241 | (synopsis "GNUnet documentation") | ||
242 | (description | ||
243 | "Gnunet-doc builds the documentation of GNUnet.") | ||
244 | (home-page "https://gnunet.org") | ||
245 | (license (package-license gnunet)))) | ||
246 | |||
247 | (define-public gnunetgpg | ||
248 | (package | ||
249 | (inherit gnunetg) | ||
250 | (name "gnunetgpg") | ||
251 | (inputs | ||
252 | `(("postgresql" ,postgresql) | ||
253 | ,@(package-inputs gnunetg))) | ||
254 | (synopsis "gnunet, variant with postgres"))) | ||
255 | |||
256 | (define-public gnunetgf | ||
257 | (package | ||
258 | (inherit gnunetg) | ||
259 | (name "gnunetgf") | ||
260 | (inputs | ||
261 | `(("postgresql" ,postgresql) | ||
262 | ("mysql" ,mysql) | ||
263 | ,@(package-inputs gnunetg))) | ||
264 | (arguments | ||
265 | `(#:configure-flags | ||
266 | (list (string-append "--with-nssdir=" %output "/lib") | ||
267 | "--enable-gcc-hardening" | ||
268 | "--enable-linker-hardening" | ||
269 | |||
270 | "--enable-poisoning" | ||
271 | "--enable-sanitizer" | ||
272 | "--enable-experimental" | ||
273 | "--enable-logging=verbose" | ||
274 | "CFLAGS=-ggdb -O0") | ||
275 | #:parallel-tests? #f ; parallel building is not supported. | ||
276 | ;;#:tests? #f ; fail: test_gnunet_statistics.py | ||
277 | #:phases | ||
278 | ;; swap check and install phases and set paths to installed bin | ||
279 | (modify-phases %standard-phases | ||
280 | (add-after 'unpack 'patch-bin-sh | ||
281 | (lambda _ | ||
282 | (substitute* "bootstrap" | ||
283 | (("contrib/pogen.sh") "sh contrib/pogen.sh")) | ||
284 | (for-each (lambda (f) (chmod f #o755)) | ||
285 | (find-files "po" "")) | ||
286 | #t)) | ||
287 | (add-after 'patch-bin-sh 'bootstrap | ||
288 | (lambda _ | ||
289 | (zero? (system* "sh" "bootstrap")))) | ||
290 | (delete 'check)))) | ||
291 | (synopsis "gnunet, full git build without tests"))) | ||
292 | |||
293 | ;; A package to run the test suite. | ||
294 | (define-public gnunetgft | ||
295 | (package | ||
296 | (inherit gnunetg) | ||
297 | (name "gnunetgft") | ||
298 | (arguments | ||
299 | `(#:configure-flags | ||
300 | (list (string-append "--with-nssdir=" %output "/lib") | ||
301 | "--enable-gcc-hardening" | ||
302 | "--enable-linker-hardening" | ||
303 | |||
304 | ;;"--enable-poisoning" | ||
305 | ;;"--enable-sanitizer" | ||
306 | "--enable-experimental" | ||
307 | "--enable-logging=verbose" | ||
308 | "CFLAGS=-ggdb -O0") | ||
309 | ;; #:parallel-tests? #f ; parallel building seems to fail | ||
310 | ;;#:tests? #f ; fail: test_gnunet_statistics.py | ||
311 | #:phases | ||
312 | ;; swap check and install phases and set paths to installed bin | ||
313 | (modify-phases %standard-phases | ||
314 | (add-after 'unpack 'patch-bin-sh | ||
315 | (lambda _ | ||
316 | (substitute* "bootstrap" | ||
317 | (("contrib/pogen.sh") "sh contrib/pogen.sh")) | ||
318 | (for-each (lambda (f) (chmod f #o755)) | ||
319 | (find-files "po" "")) | ||
320 | #t)) | ||
321 | (add-after 'patch-bin-sh 'bootstrap | ||
322 | (lambda _ | ||
323 | (zero? (system* "sh" "bootstrap")))) | ||
324 | (delete 'check) | ||
325 | ;; XXX: https://gnunet.org/bugs/view.php?id=4619 | ||
326 | (add-after 'install 'set-path-for-check | ||
327 | (lambda* (#:key outputs #:allow-other-keys) | ||
328 | (let* ((out (assoc-ref outputs "out")) | ||
329 | (bin (string-append out "/bin")) | ||
330 | (lib (string-append out "/lib"))) | ||
331 | (setenv "GNUNET_PREFIX" lib) | ||
332 | (setenv "PATH" (string-append (getenv "PATH") ":" bin)) | ||
333 | (zero? (system* "make" "check")))))))) | ||
334 | (synopsis "gnunet, full git with tests enabled with parallel tests"))) | ||
335 | |||
336 | ;; ... and one package to test the package with "parallel-tests? #f" | ||
337 | (define-public gnunetgftn | ||
338 | (package | ||
339 | (inherit gnunetg) | ||
340 | (name "gnunetgftn") | ||
341 | (arguments | ||
342 | `(#:configure-flags | ||
343 | (list (string-append "--with-nssdir=" %output "/lib") | ||
344 | "--enable-gcc-hardening" | ||
345 | "--enable-linker-hardening" | ||
346 | |||
347 | "--enable-poisoning" | ||
348 | "--enable-sanitizer" | ||
349 | "--enable-experimental" | ||
350 | "--enable-logging=verbose" | ||
351 | "CFLAGS=-ggdb"); -O0") | ||
352 | #:parallel-tests? #f ; parallel building seems to fail | ||
353 | ;;#:tests? #f ; fail: test_gnunet_statistics.py | ||
354 | #:phases | ||
355 | ;; swap check and install phases and set paths to installed bin | ||
356 | (modify-phases %standard-phases | ||
357 | (add-after 'unpack 'patch-bin-sh | ||
358 | (lambda _ | ||
359 | (substitute* "bootstrap" | ||
360 | (("contrib/pogen.sh") "sh contrib/pogen.sh")) | ||
361 | (for-each (lambda (f) (chmod f #o755)) | ||
362 | (find-files "po" "")) | ||
363 | #t)) | ||
364 | (add-after 'patch-bin-sh 'bootstrap | ||
365 | (lambda _ | ||
366 | (zero? (system* "sh" "bootstrap")))) | ||
367 | (delete 'check) | ||
368 | ;; XXX: https://gnunet.org/bugs/view.php?id=4619 | ||
369 | (add-after 'install 'set-path-for-check | ||
370 | (lambda* (#:key outputs #:allow-other-keys) | ||
371 | (let* ((out (assoc-ref outputs "out")) | ||
372 | (bin (string-append out "/bin")) | ||
373 | (lib (string-append out "/lib"))) | ||
374 | (setenv "GNUNET_PREFIX" lib) | ||
375 | (setenv "PATH" (string-append (getenv "PATH") ":" bin)) | ||
376 | (zero? (system* "make" "check")))))))))) | ||
377 | |||
378 | (define-public gnunet-gtkg | ||
379 | (let* ((commit "087f8e166ee6d1fc59a6bd5d05f656528761ede7") | ||
380 | (revision "5")) | ||
381 | (package | ||
382 | (inherit gnunetgf) | ||
383 | (name "gnunet-gtkg") | ||
384 | (version (package-version gnunetgf)) | ||
385 | (source | ||
386 | (origin | ||
387 | (method git-fetch) | ||
388 | (uri (git-reference | ||
389 | (url "https://gnunet.org/git/gnunet-gtk.git") | ||
390 | (commit commit))) | ||
391 | (file-name (string-append name "-" version "-checkout")) | ||
392 | (sha256 | ||
393 | (base32 | ||
394 | "1k03d8l0yz4fpliy5bg5s7qkpidzd6ryr4cd63wgmd227p32i87q")))) | ||
395 | (arguments | ||
396 | `(#:configure-flags | ||
397 | (list "--with-libunique" | ||
398 | "--with-qrencode" | ||
399 | (string-append "--with-gnunet=" | ||
400 | (assoc-ref %build-inputs "gnunetgf"))) | ||
401 | #:phases | ||
402 | (modify-phases %standard-phases | ||
403 | (add-before 'configure 'bootstrap | ||
404 | (lambda _ | ||
405 | (zero? (system* "autoreconf" "-vfi"))))))) | ||
406 | (inputs | ||
407 | `(("gnunetgf" ,gnunetgf) | ||
408 | ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) | ||
409 | ("gnutls" ,gnutls) | ||
410 | ("libgcrypt" ,libgcrypt) | ||
411 | ("gtk+" ,gtk+) | ||
412 | ("libextractor" ,libextractor) | ||
413 | ("glade3" ,glade3) | ||
414 | ("qrencode" ,qrencode) | ||
415 | ("libunique" ,libunique))) | ||
416 | (native-inputs | ||
417 | `(("pkg-config" ,pkg-config) | ||
418 | ("libglade" ,libglade) | ||
419 | ("autoconf" ,autoconf) | ||
420 | ("gnu-gettext" ,gnu-gettext) | ||
421 | ("texinfo" ,texinfo) | ||
422 | ("automake" ,automake) | ||
423 | ("libtool" ,libtool))) | ||
424 | (synopsis "Graphical front-end tools for GNUnet") | ||
425 | (home-page "https://gnunet.org")))) | ||
426 | |||
427 | ;; fuse, pointing to the tests disabled version of gnunet-git | ||
428 | (define-public gnunet-fuse-git | ||
429 | (let* ((commit "3503aeff6db6b39b85e13f9483d46d49ce9cec55") | ||
430 | (revision "3")) | ||
431 | (package | ||
432 | (inherit gnunetg) | ||
433 | ;;(inherit gnunet) | ||
434 | (name "gnunet-fuse-git") | ||
435 | (version (package-version gnunetgf)) | ||
436 | ;;(version (package-version gnunet)) | ||
437 | (source | ||
438 | (origin | ||
439 | (method git-fetch) | ||
440 | (uri (git-reference | ||
441 | (url "https://gnunet.org/git/gnunet-fuse.git") | ||
442 | (commit commit))) | ||
443 | (file-name (string-append name "-" version "-checkout")) | ||
444 | (sha256 | ||
445 | (base32 | ||
446 | "0sxzppanw2nrjqv1vnyj2jx3ja6gqrg0ibkl5n1fr265cqk5hgc5")))) | ||
447 | (arguments | ||
448 | `(#:configure-flags | ||
449 | (list "--with-qrencode" | ||
450 | (string-append "--with-gnunet=" | ||
451 | (assoc-ref %build-inputs "gnunetgf"))) ;"gnunet"))) | ||
452 | #:phases | ||
453 | (modify-phases %standard-phases | ||
454 | (add-after 'unpack 'fix-gnunet-include-path | ||
455 | (lambda _ | ||
456 | (substitute* "configure.ac" | ||
457 | (("gnunet/gnunet_util_lib.h") | ||
458 | "${lookin}/include/gnunet/gnunet_util_lib.h")) | ||
459 | #t)) | ||
460 | (add-before 'configure 'bootstrap | ||
461 | (lambda _ | ||
462 | (zero? (system* "autoreconf" "-vfi"))))))) | ||
463 | (inputs | ||
464 | `(("gnunetgf" ,gnunetgf))) | ||
465 | ;;`(("gnunet" ,gnunet))) | ||
466 | (native-inputs | ||
467 | `(("pkg-config" ,pkg-config) | ||
468 | ("fuse" ,fuse) | ||
469 | ("autoconf" ,autoconf) | ||
470 | ("gnu-gettext" ,gnu-gettext) | ||
471 | ("automake" ,automake) | ||
472 | ("libtool" ,libtool))) | ||
473 | (synopsis "FUSE for GNUnet") | ||
474 | (home-page "https://gnunet.org")))) | ||
diff --git a/default.nix b/contrib/packages/nix/default.nix index ffbcd4c44..ffbcd4c44 100644 --- a/default.nix +++ b/contrib/packages/nix/default.nix | |||
diff --git a/gnunet-dev.nix b/contrib/packages/nix/gnunet-dev.nix index 89b65f6b4..89b65f6b4 100644 --- a/gnunet-dev.nix +++ b/contrib/packages/nix/gnunet-dev.nix | |||
diff --git a/doc/Makefile.am b/doc/Makefile.am index e130ccc0e..07aafbb51 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am | |||
@@ -3,40 +3,73 @@ SUBDIRS = man doxygen | |||
3 | 3 | ||
4 | docdir = $(datadir)/doc/gnunet/ | 4 | docdir = $(datadir)/doc/gnunet/ |
5 | 5 | ||
6 | gnunet_doc_images = \ | 6 | infoimagedir = $(infodir)/images |
7 | images/gnunet-gtk-0-10-gns-a-done.png \ | ||
8 | images/gnunet-gtk-0-10-gns-a.png \ | ||
9 | images/daemon_lego_block.png \ | ||
10 | images/gnunet-gtk-0-10-gns.png \ | ||
11 | images/gnunet-0-10-peerinfo.png \ | ||
12 | images/gnunet-gtk-0-10-identity.png \ | ||
13 | images/gnunet-fs-gtk-0-10-star-tab.png \ | ||
14 | images/gnunet-gtk-0-10.png \ | ||
15 | images/gnunet-gtk-0-10-download-area.png \ | ||
16 | images/gnunet-gtk-0-10-search-selected.png \ | ||
17 | images/gnunet-gtk-0-10-fs-menu.png \ | ||
18 | images/gnunet-gtk-0-10-traffic.png \ | ||
19 | images/gnunet-gtk-0-10-fs.png \ | ||
20 | images/gnunet-namestore-gtk-phone.png \ | ||
21 | images/gnunet-gtk-0-10-fs-publish-editing.png \ | ||
22 | images/gnunet-namestore-gtk-vpn.png \ | ||
23 | images/gnunet-gtk-0-10-fs-published.png \ | ||
24 | images/gnunet-setup-exit.png \ | ||
25 | images/gnunet-gtk-0-10-fs-publish.png \ | ||
26 | images/iceweasel-preferences.png \ | ||
27 | images/gnunet-gtk-0-10-fs-publish-select.png \ | ||
28 | images/iceweasel-proxy.png \ | ||
29 | images/gnunet-gtk-0-10-fs-publish-with-file_0.png \ | ||
30 | images/service_lego_block.png \ | ||
31 | images/gnunet-gtk-0-10-fs-publish-with-file.png \ | ||
32 | images/service_stack.png \ | ||
33 | images/gnunet-gtk-0-10-fs-search.png | ||
34 | 7 | ||
35 | info_TEXINFOS = \ | 8 | dist_infoimage_DATA = \ |
36 | gnunet.texi | 9 | %D%/images/gnunet-gtk-0-10-gns-a-done.png \ |
10 | %D%/images/gnunet-gtk-0-10-gns-a.png \ | ||
11 | %D%/images/daemon_lego_block.png \ | ||
12 | %D%/images/gnunet-gtk-0-10-gns.png \ | ||
13 | %D%/images/gnunet-0-10-peerinfo.png \ | ||
14 | %D%/images/gnunet-gtk-0-10-identity.png \ | ||
15 | %D%/images/gnunet-fs-gtk-0-10-star-tab.png \ | ||
16 | %D%/images/gnunet-gtk-0-10.png \ | ||
17 | %D%/images/gnunet-gtk-0-10-download-area.png \ | ||
18 | %D%/images/gnunet-gtk-0-10-search-selected.png \ | ||
19 | %D%/images/gnunet-gtk-0-10-fs-menu.png \ | ||
20 | %D%/images/gnunet-gtk-0-10-traffic.png \ | ||
21 | %D%/images/gnunet-gtk-0-10-fs.png \ | ||
22 | %D%/images/gnunet-namestore-gtk-phone.png \ | ||
23 | %D%/images/gnunet-gtk-0-10-fs-publish-editing.png \ | ||
24 | %D%/images/gnunet-namestore-gtk-vpn.png \ | ||
25 | %D%/images/gnunet-gtk-0-10-fs-published.png \ | ||
26 | %D%/images/gnunet-setup-exit.png \ | ||
27 | %D%/images/gnunet-gtk-0-10-fs-publish.png \ | ||
28 | %D%/images/iceweasel-preferences.png \ | ||
29 | %D%/images/gnunet-gtk-0-10-fs-publish-select.png \ | ||
30 | %D%/images/iceweasel-proxy.png \ | ||
31 | %D%/images/gnunet-gtk-0-10-fs-publish-with-file_0.png \ | ||
32 | %D%/images/service_lego_block.png \ | ||
33 | %D%/images/gnunet-gtk-0-10-fs-publish-with-file.png \ | ||
34 | %D%/images/service_stack.png \ | ||
35 | %D%/images/gnunet-gtk-0-10-fs-search.png \ | ||
36 | %D%/images/gnunet-tutorial-service.png \ | ||
37 | %D%/images/gnunet-tutorial-system.png \ | ||
38 | %D%/images/daemon_lego_block.svg \ | ||
39 | %D%/images/lego_stack.svg \ | ||
40 | %D%/images/service_lego_block.svg | ||
41 | |||
42 | gnunet_tutorial_examples = \ | ||
43 | 001.c \ | ||
44 | 002.c \ | ||
45 | 003.c \ | ||
46 | 004.c \ | ||
47 | 005.c \ | ||
48 | 006.c \ | ||
49 | 007.c \ | ||
50 | 008.c \ | ||
51 | 009.c \ | ||
52 | 010.c \ | ||
53 | 011.c \ | ||
54 | 012.c \ | ||
55 | 013.c \ | ||
56 | 014.c \ | ||
57 | 015.c \ | ||
58 | 016.c \ | ||
59 | 017.c \ | ||
60 | 018.c \ | ||
61 | 019.c \ | ||
62 | 020.c \ | ||
63 | 021.c \ | ||
64 | 022.c \ | ||
65 | 023.c \ | ||
66 | 024.c \ | ||
67 | 025.c \ | ||
68 | 026.c | ||
37 | 69 | ||
38 | # FIXME: include this file in the documentation: | 70 | info_TEXINFOS = \ |
39 | # gnunet-c-tutorial.tex | 71 | gnunet.texi \ |
72 | gnunet-c-tutorial.texi | ||
40 | 73 | ||
41 | gnunet_TEXINFOS = \ | 74 | gnunet_TEXINFOS = \ |
42 | chapters/developer.texi \ | 75 | chapters/developer.texi \ |
@@ -48,4 +81,65 @@ gnunet_TEXINFOS = \ | |||
48 | 81 | ||
49 | EXTRA_DIST = \ | 82 | EXTRA_DIST = \ |
50 | $(gnunet_TEXINFOS) \ | 83 | $(gnunet_TEXINFOS) \ |
51 | $(gnunet_doc_images) | 84 | $(gnunet_tutorial_examples) \ |
85 | outdated-and-old-installation-instructions.txt \ | ||
86 | gnunet-c-tutorial-v1.pdf \ | ||
87 | README.txt | ||
88 | |||
89 | daemon_lego_block.png: images/daemon_lego_block.svg | ||
90 | convert images/daemon_lego_block.svg images/daemon_lego_block.png && | ||
91 | pngcrush images/daemon_lego_block.png images/daemon_lego_block.png | ||
92 | |||
93 | service_lego_block.png: images/service_lego_block.svg | ||
94 | convert images/service_lego_block.svg images/service_lego_block.png && | ||
95 | pngcrush images/service_lego_block.png images/serivce_lego_block.png | ||
96 | |||
97 | lego_stack.png: images/lego_stack.svg | ||
98 | convert images/lego_stack.svg images/lego_stack.png && | ||
99 | pngcrush images/lego_stack.png images/lego_stack.png | ||
100 | |||
101 | version.texi: | ||
102 | echo "@set UPDATED $(date +'%d %B %Y')" > $@ | ||
103 | echo "@set UPDATED-MONTH $(date +'%B %Y')" >> $@ | ||
104 | echo "@set EDITION $(PACKAGE_VERSION)" >> $@ | ||
105 | echo "@set VERSION $(PACKAGE_VERSION)" >> $@ | ||
106 | |||
107 | doc-pdf: version.texi | ||
108 | @makeinfo --pdf --quiet gnunet.texi | ||
109 | doc-pdf-tutorial: version.texi | ||
110 | @makeinfo --pdf --quiet gnunet-c-tutorial.texi | ||
111 | |||
112 | doc-html: version.texi | ||
113 | @makeinfo --html gnunet.texi | ||
114 | doc-html-tutorial: version.texi | ||
115 | @makeinfo --html gnunet-c-tutorial.texi | ||
116 | |||
117 | doc-info: version.texi | ||
118 | @makeinfo --no-split gnunet.texi | ||
119 | doc-info-tutorial: version.texi | ||
120 | @makeinfo --no-split gnunet-c-tutorial.texi | ||
121 | |||
122 | # FIXME: rm *.html and *.pdf | ||
123 | doc-clean: | ||
124 | @rm *.aux *.log *.toc *.cp *.cps | ||
125 | |||
126 | doc-all: doc-pdf doc-html doc-info doc-pdf-tutorial doc-html-tutorial doc-info-tutorial | ||
127 | |||
128 | doc-pdf-noise: version.texi | ||
129 | @makeinfo --pdf gnunet.texi | ||
130 | doc-pdf-tutorial-noise: version.texi | ||
131 | @makeinfo --pdf gnunet-c-tutorial.texi | ||
132 | |||
133 | doc-html-noise: version.texi | ||
134 | @makeinfo --html gnunet.texi | ||
135 | doc-html-tutorial-noise: version.texi | ||
136 | @makeinfo --html gnunet-c-tutorial.texi | ||
137 | |||
138 | doc-info-noise: version.texi | ||
139 | @makeinfo --no-split gnunet.texi | ||
140 | doc-info-tutorial-noise: version.texi | ||
141 | @makeinfo --no-split gnunet-c-tutorial.texi | ||
142 | |||
143 | doc-all-give-me-the-noise: doc-pdf-noise doc-html-noise doc-info-noise doc-pdf-tutorial-noise doc-html-tutorial-noise doc-info-tutorial-noise | ||
144 | |||
145 | .PHONY: version.texi | ||
diff --git a/doc/README.txt b/doc/README.txt new file mode 100644 index 000000000..2abe479dd --- /dev/null +++ b/doc/README.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | * What's left to do | ||
2 | |||
3 | - Which Texlive modules are needed? Decrease the size. | ||
4 | - Update the content of gnunet documentation. | ||
5 | |||
6 | * How to use (hack) on this | ||
7 | |||
8 | ** with guix | ||
9 | |||
10 | export the environment variable GUIX_PACKAGE_PATH as $GUIX_PACKAGE_PATH:gnunet/contrib/packages/guix/packages | ||
11 | guix environment gnunet-doc | ||
12 | |||
13 | ** without guix | ||
14 | |||
15 | You need to have Texinfo and Texlive in your path. | ||
16 | sh bootstrap | ||
17 | ./configure | ||
18 | cd doc | ||
19 | make doc-all-give-me-the-noise | ||
20 | |||
21 | * structure (relations) | ||
22 | |||
23 | ** gnunet.texi | ||
24 | -> chapters/developer.texi | ||
25 | -> chapters/installation.texi | ||
26 | -> chapters/philosophy.texi | ||
27 | -> chapters/user.texi | ||
28 | -> images/* | ||
29 | -> gpl-3.0.texi | ||
30 | -> fdl-1.3.texi | ||
31 | |||
32 | ** gnunet-c-tutorial.texi | ||
33 | -> figs/Service.pdf | ||
34 | -> figs/System.pdf | ||
35 | -> tutorial-examples/*.c | ||
36 | -> gpl-3.0.texi | ||
37 | -> fdl-1.3.texi | ||
38 | |||
39 | - gnunet-c-tutorial-v1.pdf: original LaTeX "gnunet-c-tutorial.pdf". | ||
40 | - man folder: the man pages. | ||
41 | - doxygen folder | ||
42 | - outdated-and-old-installation-instructions.txt: self described within the file. | ||
diff --git a/doc/chapters/developer.texi b/doc/chapters/developer.texi index 8b7954836..e7f507746 100644 --- a/doc/chapters/developer.texi +++ b/doc/chapters/developer.texi | |||
@@ -97,16 +97,18 @@ advertisements for bogus websites. | |||
97 | 97 | ||
98 | This developer handbook is intended as first introduction to GNUnet for new | 98 | This developer handbook is intended as first introduction to GNUnet for new |
99 | developers that want to extend the GNUnet framework. After the introduction, | 99 | developers that want to extend the GNUnet framework. After the introduction, |
100 | each of the GNUnet subsystems (directories in the src/ tree) is (supposed to | 100 | each of the GNUnet subsystems (directories in the @file{src/} tree) is (supposed to |
101 | be) covered in its own chapter. In addition to this documentation, GNUnet | 101 | be) covered in its own chapter. In addition to this documentation, GNUnet |
102 | developers should be aware of the services available on the GNUnet server to | 102 | developers should be aware of the services available on the GNUnet server to |
103 | them. | 103 | them. |
104 | 104 | ||
105 | New developers can have a look a the GNUnet tutorials for C and java available | 105 | New developers can have a look a the GNUnet tutorials for C and java available |
106 | in the src/ directory of the repository or under the following links: | 106 | in the @file{src/} directory of the repository or under the following links: |
107 | 107 | ||
108 | @c ** FIXME: Link to files in source, not online. | ||
109 | @c ** FIXME: Where is the Java tutorial? | ||
108 | @itemize @bullet | 110 | @itemize @bullet |
109 | @item GNUnet C tutorial | 111 | @item @uref{https://gnunet.org/git/gnunet.git/plain/doc/gnunet-c-tutorial.pdf, GNUnet C tutorial} |
110 | @item GNUnet Java tutorial | 112 | @item GNUnet Java tutorial |
111 | @end itemize | 113 | @end itemize |
112 | 114 | ||
@@ -123,8 +125,7 @@ The public subsystems on the GNUnet server that help developers are: | |||
123 | @item The Version control system keeps our code and enables distributed | 125 | @item The Version control system keeps our code and enables distributed |
124 | development. Only developers with write access can commit code, everyone else | 126 | development. Only developers with write access can commit code, everyone else |
125 | is encouraged to submit patches to the | 127 | is encouraged to submit patches to the |
126 | @uref{http://mail.gnu.org/mailman/listinfo/gnunet-developers, developer | 128 | @uref{https://lists.gnu.org/mailman/listinfo/gnunet-developers, GNUnet-developers mailinglist}. |
127 | mailinglist}. | ||
128 | @item The GNUnet bugtracking system is used to track feature requests, open bug | 129 | @item The GNUnet bugtracking system is used to track feature requests, open bug |
129 | reports and their resolutions. Anyone can report bugs, only developers can | 130 | reports and their resolutions. Anyone can report bugs, only developers can |
130 | claim to have fixed them. | 131 | claim to have fixed them. |
@@ -168,36 +169,35 @@ GNUnet sub-projects in order of likely relevance are currently: | |||
168 | 169 | ||
169 | @table @asis | 170 | @table @asis |
170 | 171 | ||
171 | @item svn/gnunet Core of the P2P framework, including file-sharing, VPN and | 172 | @item gnunet Core of the P2P framework, including file-sharing, VPN and |
172 | chat applications; this is what the developer handbook covers mostly | 173 | chat applications; this is what the developer handbook covers mostly |
173 | @item svn/gnunet-gtk/ Gtk+-based user interfaces, including gnunet-fs-gtk | 174 | @item gnunet-gtk Gtk+-based user interfaces, including gnunet-fs-gtk |
174 | (file-sharing), gnunet-statistics-gtk (statistics over time), | 175 | (file-sharing), gnunet-statistics-gtk (statistics over time), |
175 | gnunet-peerinfo-gtk (information about current connections and known peers), | 176 | gnunet-peerinfo-gtk (information about current connections and known peers), |
176 | gnunet-chat-gtk (chat GUI) and gnunet-setup (setup tool for "everything") | 177 | gnunet-chat-gtk (chat GUI) and gnunet-setup (setup tool for "everything") |
177 | @item svn/gnunet-fuse/ Mounting directories shared via GNUnet's file-sharing on Linux | 178 | @item gnunet-fuse Mounting directories shared via GNUnet's file-sharing on Linux |
178 | @item svn/gnunet-update/ Installation and update tool | 179 | @item gnunet-update Installation and update tool |
179 | @item svn/gnunet-ext/ | 180 | @item gnunet-ext Template for starting 'external' GNUnet projects |
180 | Template for starting 'external' GNUnet projects | 181 | @item gnunet-java Java APIs for writing GNUnet services and applications |
181 | @item svn/gnunet-java/ Java | 182 | @c ** FIXME: Point to new website repository once we have it: |
182 | APIs for writing GNUnet services and applications | 183 | @c ** @item svn/gnunet-www/ Code and media helping drive the GNUnet website |
183 | @item svn/gnunet-www/ Code | 184 | @item eclectic Code to run |
184 | and media helping drive the GNUnet website | ||
185 | @item svn/eclectic/ Code to run | ||
186 | GNUnet nodes on testbeds for research, development, testing and evaluation | 185 | GNUnet nodes on testbeds for research, development, testing and evaluation |
187 | @item svn/gnunet-qt/ qt-based GNUnet GUI (dead?) | 186 | @c ** FIXME: Solve the status and location of gnunet-qt |
188 | @item svn/gnunet-cocoa/ | 187 | @item gnunet-qt qt-based GNUnet GUI (dead?) |
189 | cocoa-based GNUnet GUI (dead?) | 188 | @item gnunet-cocoa cocoa-based GNUnet GUI (dead?) |
190 | 189 | ||
191 | @end table | 190 | @end table |
192 | 191 | ||
193 | We are also working on various supporting libraries and tools: | 192 | We are also working on various supporting libraries and tools: |
193 | @c ** FIXME: What about gauger, and what about libmwmodem? | ||
194 | 194 | ||
195 | @table @asis | 195 | @table @asis |
196 | @item svn/Extractor/ GNU libextractor (meta data extraction) | 196 | @item libextractor GNU libextractor (meta data extraction) |
197 | @item svn/libmicrohttpd/ GNU libmicrohttpd (embedded HTTP(S) server library) | 197 | @item libmicrohttpd GNU libmicrohttpd (embedded HTTP(S) server library) |
198 | @item svn/gauger/ Tool for performance regression analysis | 198 | @item gauger Tool for performance regression analysis |
199 | @item svn/monkey/ Tool for automated debugging of distributed systems | 199 | @item monkey Tool for automated debugging of distributed systems |
200 | @item svn/libmwmodem/ Library for accessing satellite connection quality reports | 200 | @item libmwmodem Library for accessing satellite connection quality reports |
201 | @end table | 201 | @end table |
202 | 202 | ||
203 | Finally, there are various external projects (see links for a list of those | 203 | Finally, there are various external projects (see links for a list of those |
@@ -208,7 +208,7 @@ that have a public website) which build on top of the GNUnet framework. | |||
208 | @section Code overview | 208 | @section Code overview |
209 | 209 | ||
210 | This section gives a brief overview of the GNUnet source code. Specifically, we | 210 | This section gives a brief overview of the GNUnet source code. Specifically, we |
211 | sketch the function of each of the subdirectories in the @code{gnunet/src/} | 211 | sketch the function of each of the subdirectories in the @file{gnunet/src/} |
212 | directory. The order given is roughly bottom-up (in terms of the layers of the | 212 | directory. The order given is roughly bottom-up (in terms of the layers of the |
213 | system). | 213 | system). |
214 | @table @asis | 214 | @table @asis |
@@ -871,9 +871,9 @@ gnunet-ext template to provide an easy to use skeleton. | |||
871 | gnunet-ext contains the build environment and template files for the | 871 | gnunet-ext contains the build environment and template files for the |
872 | development of GNUnet services, command line tools, APIs and tests. | 872 | development of GNUnet services, command line tools, APIs and tests. |
873 | 873 | ||
874 | First of all you have to obtain gnunet-ext from SVN: | 874 | First of all you have to obtain gnunet-ext from git: |
875 | 875 | ||
876 | @code{svn co https://gnunet.org/svn/gnunet-ext} | 876 | @code{git clone https://gnunet.org/git/gnunet-ext.git} |
877 | 877 | ||
878 | The next step is to bootstrap and configure it. For configure you have to | 878 | The next step is to bootstrap and configure it. For configure you have to |
879 | provide the path containing GNUnet with @code{--with-gnunet=/path/to/gnunet} | 879 | provide the path containing GNUnet with @code{--with-gnunet=/path/to/gnunet} |
@@ -1325,7 +1325,7 @@ require the option @code{OVERLAY_RANDOM_LINKS} to be set to the number of | |||
1325 | random links to be generated in the configuration. The option will be ignored | 1325 | random links to be generated in the configuration. The option will be ignored |
1326 | for the rest of the topologies. | 1326 | for the rest of the topologies. |
1327 | 1327 | ||
1328 | Toplogy @code{SCALE_FREE} requires the options @code{SCALE_FREE_TOPOLOGY_CAP} | 1328 | Topology @code{SCALE_FREE} requires the options @code{SCALE_FREE_TOPOLOGY_CAP} |
1329 | to be set to the maximum number of peers which can connect to a peer and | 1329 | to be set to the maximum number of peers which can connect to a peer and |
1330 | @code{SCALE_FREE_TOPOLOGY_M} to be set to how many peers a peer should be | 1330 | @code{SCALE_FREE_TOPOLOGY_M} to be set to how many peers a peer should be |
1331 | atleast connected to. | 1331 | atleast connected to. |
@@ -1724,7 +1724,7 @@ porting of GNUnet easier. | |||
1724 | GNUnet is able to log its activity, mostly for the purposes of debugging the | 1724 | GNUnet is able to log its activity, mostly for the purposes of debugging the |
1725 | program at various levels. | 1725 | program at various levels. |
1726 | 1726 | ||
1727 | @code{gnunet_common.h} defines several @strong{log levels}: | 1727 | @file{gnunet_common.h} defines several @strong{log levels}: |
1728 | @table @asis | 1728 | @table @asis |
1729 | 1729 | ||
1730 | @item ERROR for errors (really problematic situations, often leading to | 1730 | @item ERROR for errors (really problematic situations, often leading to |
diff --git a/doc/chapters/installation.texi b/doc/chapters/installation.texi index 4b1db324f..edbad84de 100644 --- a/doc/chapters/installation.texi +++ b/doc/chapters/installation.texi | |||
@@ -13,6 +13,7 @@ in the form of new chapters or insightful comments. | |||
13 | 13 | ||
14 | @menu | 14 | @menu |
15 | * Dependencies:: | 15 | * Dependencies:: |
16 | * Pre-installation notes:: | ||
16 | * Generic installation instructions:: | 17 | * Generic installation instructions:: |
17 | * Build instructions for Ubuntu 12.04 using Git:: | 18 | * Build instructions for Ubuntu 12.04 using Git:: |
18 | * Build Instructions for Microsoft Windows Platforms:: | 19 | * Build Instructions for Microsoft Windows Platforms:: |
@@ -48,62 +49,43 @@ These packages must be installed before a typical GNUnet installation | |||
48 | can be performed: | 49 | can be performed: |
49 | 50 | ||
50 | @table @asis | 51 | @table @asis |
51 | @item GNU libmicrohttpd | 52 | @item GNU libmicrohttpd 0.9.30 or higher |
52 | 0.9.30 or higher | 53 | @item GNU libextractor 1.0 or higher |
53 | @item GNU libextractor | 54 | @item GNU libtool 2.2 or higher |
54 | 1.0 or higher | 55 | @item GNU libunistring 0.9.1.1 or higher |
55 | @item GNU libtool | 56 | @item GNU libidn 1.0.0 or higher |
56 | 2.2 or higher | 57 | @item @uref{https://gnupg.org/software/libgcrypt/index.html, GNU libgcrypt} |
57 | @item GNU libunistring | 58 | @uref{https://gnupg.org/ftp/gcrypt/libgcrypt/, 1.6.0} or higher |
58 | 0.9.1.1 or higher | 59 | @item @uref{https://gnutls.org/, GnuTLS} |
59 | @item GNU libidn | 60 | @uref{https://www.gnupg.org/ftp/gcrypt/gnutls/v3.2/, 3.2.7} or higher, |
60 | 1.0.0 or higher | 61 | compile with libunbound for DANE support; GnuTLS also requires GNU |
61 | @item @uref{ftp://ftp.gnupg.org/gcrypt/libgcrypt/, GNU libgcrypt} | ||
62 | @uref{ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.0.tar.bz2, 1.6.0} or | ||
63 | higher | ||
64 | @item GnuTLS | ||
65 | @uref{ftp://ftp.gnutls.org/gcrypt/gnutls/v3.2/gnutls-3.2.7.tar.xz, 3.2.7} or | ||
66 | higher, compile with libunbound for DANE support; GnuTLS also requires GNU | ||
67 | nettle 2.7 (update: GnuTLS 3.2.7 appears NOT to work against GNU nettle | 62 | nettle 2.7 (update: GnuTLS 3.2.7 appears NOT to work against GNU nettle |
68 | > 2.7, due to some API updatings done by nettle. Thus it should be compiled | 63 | > 2.7, due to some API updatings done by nettle. Thus it should be compiled |
69 | against nettle 2.7 and, in case you get some error on the reference to | 64 | against nettle 2.7 and, in case you get some error on the reference to |
70 | `rpl_strerror' being undefined, follow the instructions on@ | 65 | `rpl_strerror' being undefined, follow the instructions on@ |
71 | @uref{http://lists.gnupg.org/pipermail/gnutls-devel/2013-November/006588.html, this} | 66 | @uref{http://lists.gnupg.org/pipermail/gnutls-devel/2013-November/006588.html, this} |
72 | post (and the link inside it)). | 67 | post (and the link inside it)). |
73 | @item libgnurl | 68 | @item @uref{https://gnunet.org/gnurl, gnURL} libgnurl 7.34.0 or higher, |
74 | 7.34.0 or higher (available from https://gnunet.org/gnurl), should be compiled | 69 | must be compiled after @code{GnuTLS} |
75 | after @code{GnuTLS} | 70 | @item libglpk 4.45 or higher |
76 | @item libglpk | 71 | @item @uref{http://www.openssl.org/, OpenSSL} (binary) 1.0 or higher |
77 | 4.45 or higher | 72 | @item TeX Live 2012 or higher, optional (for gnunet-bcd) |
78 | @item @uref{http://www.openssl.org/, OpenSSL} (binary) | 73 | @item libpulse 2.0 or higher, optional (for gnunet-conversation) |
79 | 1.0 or higher | 74 | @item libopus 1.0.1 or higher, optional (for gnunet-conversation) |
80 | @item TeX Live | 75 | @item libogg 1.3.0 or higher, optional (for gnunet-conversation) |
81 | 2012 or higher, optional (for gnunet-bcd) | ||
82 | @item libpulse | ||
83 | 2.0 or higher, optional (for gnunet-conversation) | ||
84 | @item libopus | ||
85 | 1.0.1 or higher, optional (for gnunet-conversation) | ||
86 | @item libogg | ||
87 | 1.3.0 or higher, optional (for gnunet-conversation) | ||
88 | @item certool (binary) | 76 | @item certool (binary) |
89 | optional for convenient installation of the GNS proxy | 77 | optional for convenient installation of the GNS proxy |
90 | (available as part of Debian's libnss3-tools) | 78 | (available as part of Debian's libnss3-tools) |
91 | @item python-zbar | 79 | @item python-zbar 0.10 or higher, optional (for gnunet-qr) |
92 | 0.10 or higher, optional (for gnunet-qr) | 80 | @item libsqlite 3.8.0 or higher (note that the code will compile and often work with lower |
93 | @item libsqlite | ||
94 | 3.8.0 or higher (note that the code will compile and often work with lower | ||
95 | version numbers, but you may get subtle bugs with respect to quota management | 81 | version numbers, but you may get subtle bugs with respect to quota management |
96 | in certain rare cases); alternatively, MySQL or Postgres can also be installed, | 82 | in certain rare cases); alternatively, MySQL or Postgres can also be installed, |
97 | but those databases will require more complex configurations (not recommended | 83 | but those databases will require more complex configurations (not recommended |
98 | for first-time users) | 84 | for first-time users) |
99 | @item zlib | 85 | @item zlib any version we tested worked |
100 | any version we tested worked | 86 | @item Gtk+ 3.0 or higher, optional (for gnunet-gtk) |
101 | @item Gtk+ | 87 | @item libgladeui must match Gtk+ version, optional (for gnunet-gtk) |
102 | 3.0 or higher, optional (for gnunet-gtk) | 88 | @item libqrencode 3.0 or higher, optional (for gnunet-namestore-gtk) |
103 | @item libgladeui | ||
104 | must match Gtk+ version, optional (for gnunet-gtk) | ||
105 | @item libqrencode | ||
106 | 3.0 or higher, optional (for gnunet-namestore-gtk) | ||
107 | @end table | 89 | @end table |
108 | 90 | ||
109 | 91 | ||
@@ -112,20 +94,7 @@ must match Gtk+ version, optional (for gnunet-gtk) | |||
112 | 94 | ||
113 | If you have to compile libgnurl from source since the version included in your | 95 | If you have to compile libgnurl from source since the version included in your |
114 | distribution is to old you perhaps get an error message while running the | 96 | distribution is to old you perhaps get an error message while running the |
115 | @code{configure} script: | 97 | @file{configure} script: |
116 | |||
117 | @code{@ | ||
118 | $ configure@ | ||
119 | ...@ | ||
120 | checking for 64-bit curl_off_t data type... unknown@ | ||
121 | checking for 32-bit curl_off_t data type... unknown@ | ||
122 | checking for 16-bit curl_off_t data type... unknown@ | ||
123 | configure: error: cannot find data type for curl_off_t.@ | ||
124 | } | ||
125 | |||
126 | If you have to compile libgnurl from source since the version included in your | ||
127 | distribution is to old, you perhaps get an error message while running the | ||
128 | @code{configure} script: | ||
129 | 98 | ||
130 | @code{@ | 99 | @code{@ |
131 | $ configure@ | 100 | $ configure@ |
@@ -157,30 +126,18 @@ In terms of internal dependencies, a minimum file-sharing system consists of | |||
157 | the following GNUnet processes (in order of dependency): | 126 | the following GNUnet processes (in order of dependency): |
158 | 127 | ||
159 | @itemize @bullet | 128 | @itemize @bullet |
160 | @item | 129 | @item gnunet-service-arm |
161 | gnunet-service-arm | 130 | @item gnunet-service-resolver (required by all) |
162 | @item | 131 | @item gnunet-service-statistics (required by all) |
163 | gnunet-service-resolver (required by all) | 132 | @item gnunet-service-peerinfo |
164 | @item | 133 | @item gnunet-service-transport (requires peerinfo) |
165 | gnunet-service-statistics (required by all) | 134 | @item gnunet-service-core (requires transport) |
166 | @item | 135 | @item gnunet-daemon-hostlist (requires core) |
167 | gnunet-service-peerinfo | 136 | @item gnunet-daemon-topology (requires hostlist, peerinfo) |
168 | @item | 137 | @item gnunet-service-datastore |
169 | gnunet-service-transport (requires peerinfo) | 138 | @item gnunet-service-dht (requires core) |
170 | @item | 139 | @item gnunet-service-identity |
171 | gnunet-service-core (requires transport) | 140 | @item gnunet-service-fs (requires identity, mesh, dht, datastore, core) |
172 | @item | ||
173 | gnunet-daemon-hostlist (requires core) | ||
174 | @item | ||
175 | gnunet-daemon-topology (requires hostlist, peerinfo) | ||
176 | @item | ||
177 | gnunet-service-datastore | ||
178 | @item | ||
179 | gnunet-service-dht (requires core) | ||
180 | @item | ||
181 | gnunet-service-identity | ||
182 | @item | ||
183 | gnunet-service-fs (requires identity, mesh, dht, datastore, core) | ||
184 | @end itemize | 141 | @end itemize |
185 | 142 | ||
186 | 143 | ||
@@ -188,93 +145,48 @@ A minimum VPN system consists of the following GNUnet processes (in order of | |||
188 | dependency): | 145 | dependency): |
189 | 146 | ||
190 | @itemize @bullet | 147 | @itemize @bullet |
191 | @item | 148 | @item gnunet-service-arm |
192 | gnunet-service-arm | 149 | @item gnunet-service-resolver (required by all) |
193 | 150 | @item gnunet-service-statistics (required by all) | |
194 | @item | 151 | @item gnunet-service-peerinfo |
195 | gnunet-service-resolver (required by all) | 152 | @item gnunet-service-transport (requires peerinfo) |
196 | 153 | @item gnunet-service-core (requires transport) | |
197 | @item | 154 | @item gnunet-daemon-hostlist (requires core) |
198 | gnunet-service-statistics (required by all) | 155 | @item gnunet-service-dht (requires core) |
199 | 156 | @item gnunet-service-mesh (requires dht, core) | |
200 | @item | 157 | @item gnunet-service-dns (requires dht) |
201 | gnunet-service-peerinfo | 158 | @item gnunet-service-regex (requires dht) |
202 | 159 | @item gnunet-service-vpn (requires regex, dns, mesh, dht) | |
203 | @item | ||
204 | gnunet-service-transport (requires peerinfo) | ||
205 | |||
206 | @item | ||
207 | gnunet-service-core (requires transport) | ||
208 | |||
209 | @item | ||
210 | gnunet-daemon-hostlist (requires core) | ||
211 | |||
212 | @item | ||
213 | gnunet-service-dht (requires core) | ||
214 | |||
215 | @item | ||
216 | gnunet-service-mesh (requires dht, core) | ||
217 | |||
218 | @item | ||
219 | gnunet-service-dns (requires dht) | ||
220 | |||
221 | @item | ||
222 | gnunet-service-regex (requires dht) | ||
223 | |||
224 | @item | ||
225 | gnunet-service-vpn (requires regex, dns, mesh, dht) | ||
226 | @end itemize | 160 | @end itemize |
227 | 161 | ||
228 | 162 | ||
229 | A minimum GNS system consists of the following GNUnet processes (in order of | 163 | A minimum GNS system consists of the following GNUnet processes (in order of |
230 | dependency): | 164 | dependency): |
231 | @itemize @bullet | 165 | @itemize @bullet |
166 | @item gnunet-service-arm | ||
167 | @item gnunet-service-resolver (required by all) | ||
168 | @item gnunet-service-statistics (required by all) | ||
169 | @item gnunet-service-peerinfo | ||
170 | @item gnunet-service-transport (requires peerinfo) | ||
171 | @item gnunet-service-core (requires transport) | ||
172 | @item gnunet-daemon-hostlist (requires core) | ||
173 | @item gnunet-service-dht (requires core) | ||
174 | @item gnunet-service-mesh (requires dht, core) | ||
175 | @item gnunet-service-dns (requires dht) | ||
176 | @item gnunet-service-regex (requires dht) | ||
177 | @item gnunet-service-vpn (requires regex, dns, mesh, dht) | ||
178 | @item gnunet-service-identity | ||
179 | @item gnunet-service-namestore (requires identity) | ||
180 | @item gnunet-service-gns (requires vpn, dns, dht, namestore, identity) | ||
181 | @end itemize | ||
232 | 182 | ||
233 | @item | 183 | @node Pre-installation notes |
234 | gnunet-service-arm | 184 | @section Pre-installation notes |
235 | |||
236 | @item | ||
237 | gnunet-service-resolver (required by all) | ||
238 | |||
239 | @item | ||
240 | gnunet-service-statistics (required by all) | ||
241 | |||
242 | @item | ||
243 | gnunet-service-peerinfo | ||
244 | |||
245 | @item | ||
246 | gnunet-service-transport (requires peerinfo) | ||
247 | |||
248 | @item | ||
249 | gnunet-service-core (requires transport) | ||
250 | |||
251 | @item | ||
252 | gnunet-daemon-hostlist (requires core) | ||
253 | |||
254 | @item | ||
255 | gnunet-service-dht (requires core) | ||
256 | |||
257 | @item | ||
258 | gnunet-service-mesh (requires dht, core) | ||
259 | |||
260 | @item | ||
261 | gnunet-service-dns (requires dht) | ||
262 | |||
263 | @item | ||
264 | gnunet-service-regex (requires dht) | ||
265 | |||
266 | @item | ||
267 | gnunet-service-vpn (requires regex, dns, mesh, dht) | ||
268 | 185 | ||
269 | @item | 186 | Please note that in the code instructions for the installation, |
270 | gnunet-service-identity | 187 | @emph{#} indicates commands run as privileged root user and |
188 | @emph{$} shows commands run as unprivileged ("normal") system user. | ||
271 | 189 | ||
272 | @item | ||
273 | gnunet-service-namestore (requires identity) | ||
274 | |||
275 | @item | ||
276 | gnunet-service-gns (requires vpn, dns, dht, namestore, identity) | ||
277 | @end itemize | ||
278 | 190 | ||
279 | @node Generic installation instructions | 191 | @node Generic installation instructions |
280 | @section Generic installation instructions | 192 | @section Generic installation instructions |
@@ -286,21 +198,11 @@ GNU/Linux distribution requires you to install the following | |||
286 | dependencies (ideally in this order): | 198 | dependencies (ideally in this order): |
287 | 199 | ||
288 | @itemize @bullet | 200 | @itemize @bullet |
289 | 201 | @item libgpgerror and libgcrypt | |
290 | @item | 202 | @item libnettle and libunbound (possibly from distribution), GnuTLS |
291 | libgpgerror and libgcrypt | 203 | @item libgnurl (read the README) |
292 | 204 | @item GNU libmicrohttpd | |
293 | @item | 205 | @item GNU libextractor (make sure to first install the various mandatory and optional |
294 | libnettle and libunbound (possibly from distribution), GnuTLS | ||
295 | |||
296 | @item | ||
297 | libgnurl (read the README) | ||
298 | |||
299 | @item | ||
300 | GNU libmicrohttpd | ||
301 | |||
302 | @item | ||
303 | GNU libextractor (make sure to first install the various mandatory and optional | ||
304 | dependencies including development headers from your distribution) | 206 | dependencies including development headers from your distribution) |
305 | @end itemize | 207 | @end itemize |
306 | 208 | ||
@@ -327,8 +229,8 @@ for your distribution. | |||
327 | 229 | ||
328 | While it is possible to build and install GNUnet without having root access, | 230 | While it is possible to build and install GNUnet without having root access, |
329 | we will assume that you have full control over your system in these | 231 | we will assume that you have full control over your system in these |
330 | instructions. First, you should create a system user "gnunet" and an additional | 232 | instructions. First, you should create a system user @emph{gnunet} and an additional |
331 | group "gnunetdns". On Debian and Ubuntu GNU/Linux, type:@ | 233 | group @emph{gnunetdns}. On Debian and Ubuntu GNU/Linux, type:@ |
332 | @code{@ | 234 | @code{@ |
333 | # adduser --system --home /var/lib/gnunet --group --disabled-password gnunet@ | 235 | # adduser --system --home /var/lib/gnunet --group --disabled-password gnunet@ |
334 | # addgroup --system gnunetdns@ | 236 | # addgroup --system gnunetdns@ |
@@ -344,16 +246,16 @@ group "gnunetdns". On Debian and Ubuntu GNU/Linux, type:@ | |||
344 | $ cd gnunet-0.10.?@ | 246 | $ cd gnunet-0.10.?@ |
345 | $ ./configure --with-sudo=sudo --with-nssdir=/lib@ | 247 | $ ./configure --with-sudo=sudo --with-nssdir=/lib@ |
346 | $ make@ | 248 | $ make@ |
347 | $ sudo make install@ | 249 | $ sudo make install@ |
348 | }@ | 250 | }@ |
349 | 251 | ||
350 | If you want to be able to enable DEBUG-level log messages, add | 252 | If you want to be able to enable DEBUG-level log messages, add |
351 | @code{--enable-logging=verbose} to the end of the ./configure command. | 253 | @code{--enable-logging=verbose} to the end of the @code{./configure} command. |
352 | DEBUG-level log messages are in English-only and should only be useful for | 254 | DEBUG-level log messages are in English-only and should only be useful for |
353 | developers (or for filing really detailed bug reports). | 255 | developers (or for filing really detailed bug reports). |
354 | 256 | ||
355 | Finally, you probably want to compile gnunet-gtk, which includes gnunet-setup | 257 | Finally, you probably want to compile @code{gnunet-gtk}, which includes gnunet-setup |
356 | (graphical tool for configuration) and gnunet-fs-gtk (graphical tool for | 258 | (graphical tool for configuration) and @code{gnunet-fs-gtk} (graphical tool for |
357 | file-sharing):@ | 259 | file-sharing):@ |
358 | 260 | ||
359 | @code{@ | 261 | @code{@ |
@@ -365,7 +267,7 @@ file-sharing):@ | |||
365 | $ cd ..@ | 267 | $ cd ..@ |
366 | $ sudo ldconfig # just to be safe@ | 268 | $ sudo ldconfig # just to be safe@ |
367 | }@ | 269 | }@ |
368 | Now, edit @code{/etc/gnunet.conf} to contain the following:@ | 270 | Next, edit the file @file{/etc/gnunet.conf} to contain the following:@ |
369 | @code{@ | 271 | @code{@ |
370 | [arm]@ | 272 | [arm]@ |
371 | SYSTEM_ONLY = YES@ | 273 | SYSTEM_ONLY = YES@ |
@@ -402,7 +304,7 @@ $USER on the system, run:@ | |||
402 | }@ | 304 | }@ |
403 | 305 | ||
404 | to allow them to access the system-wide GNUnet services. Then, each user should | 306 | to allow them to access the system-wide GNUnet services. Then, each user should |
405 | create a configuration file "~/.config/gnunet.conf" with the lines:@ | 307 | create a configuration file @file{~/.config/gnunet.conf} with the lines:@ |
406 | 308 | ||
407 | @code{@ | 309 | @code{@ |
408 | [arm]@ | 310 | [arm]@ |
@@ -417,7 +319,7 @@ and start the per-user services using@ | |||
417 | $ gnunet-arm -c ~/.config/gnunet.conf -s@ | 319 | $ gnunet-arm -c ~/.config/gnunet.conf -s@ |
418 | }@ | 320 | }@ |
419 | 321 | ||
420 | Again, adding a @file{crontab} entry to autostart the peer is advised:@ | 322 | Again, adding a @code{crontab} entry to autostart the peer is advised:@ |
421 | @code{@ | 323 | @code{@ |
422 | @@reboot /usr/local/bin/gnunet-arm -c $HOME/.config/gnunet.conf -s@ | 324 | @@reboot /usr/local/bin/gnunet-arm -c $HOME/.config/gnunet.conf -s@ |
423 | }@ | 325 | }@ |
@@ -445,7 +347,7 @@ hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 | |||
445 | 347 | ||
446 | 348 | ||
447 | The exact details may differ a bit, which is fine. Add the text | 349 | The exact details may differ a bit, which is fine. Add the text |
448 | "gns [NOTFOUND=return]" after "files": | 350 | @emph{"gns [NOTFOUND=return]"} after @emph{"files"}: |
449 | @example | 351 | @example |
450 | hosts: files gns [NOTFOUND=return] mdns4_minimal [NOTFOUND=return] dns mdns4 | 352 | hosts: files gns [NOTFOUND=return] mdns4_minimal [NOTFOUND=return] dns mdns4 |
451 | @end example | 353 | @end example |
@@ -496,44 +398,55 @@ $ cd ..@ | |||
496 | @node Install gnutls with DANE support | 398 | @node Install gnutls with DANE support |
497 | @subsection Install gnutls with DANE support | 399 | @subsection Install gnutls with DANE support |
498 | 400 | ||
401 | @example | ||
499 | $ wget http://www.lysator.liu.se/~nisse/archive/nettle-2.7.1.tar.gz@ | 402 | $ wget http://www.lysator.liu.se/~nisse/archive/nettle-2.7.1.tar.gz@ |
500 | $ tar xf nettle-2.7.1.tar.gz@ | 403 | $ tar xf nettle-2.7.1.tar.gz@ |
501 | $ cd nettle-2.7.1@ | 404 | $ cd nettle-2.7.1@ |
502 | $ ./configure@ | 405 | $ ./configure@ |
503 | $ sudo make install@ | 406 | $ sudo make install@ |
504 | $ cd .. | 407 | $ cd .. |
408 | @end example | ||
505 | 409 | ||
410 | @example | ||
506 | $ wget https://www.nlnetlabs.nl/downloads/ldns/ldns-1.6.16.tar.gz@ | 411 | $ wget https://www.nlnetlabs.nl/downloads/ldns/ldns-1.6.16.tar.gz@ |
507 | $ tar xf ldns-1.6.16.tar.gz@ | 412 | $ tar xf ldns-1.6.16.tar.gz@ |
508 | $ cd ldns-1.6.16@ | 413 | $ cd ldns-1.6.16@ |
509 | $ ./configure@ | 414 | $ ./configure@ |
510 | $ sudo make install@ | 415 | $ sudo make install@ |
511 | $ cd .. | 416 | $ cd .. |
417 | @end example | ||
512 | 418 | ||
419 | @example | ||
513 | $ wget https://unbound.net/downloads/unbound-1.4.21.tar.gz@ | 420 | $ wget https://unbound.net/downloads/unbound-1.4.21.tar.gz@ |
514 | $ tar xf unbound-1.4.21.tar.gz@ | 421 | $ tar xf unbound-1.4.21.tar.gz@ |
515 | $ cd unbound-1.4.21@ | 422 | $ cd unbound-1.4.21@ |
516 | $ ./configure@ | 423 | $ ./configure@ |
517 | $ sudo make install@ | 424 | $ sudo make install@ |
518 | $ cd .. | 425 | $ cd .. |
426 | @end example | ||
519 | 427 | ||
428 | @example | ||
520 | $ wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.17.tar.xz@ | 429 | $ wget ftp://ftp.gnutls.org/gcrypt/gnutls/v3.1/gnutls-3.1.17.tar.xz@ |
521 | $ tar xf gnutls-3.1.17.tar.xz@ | 430 | $ tar xf gnutls-3.1.17.tar.xz@ |
522 | $ cd gnutls-3.1.17@ | 431 | $ cd gnutls-3.1.17@ |
523 | $ ./configure@ | 432 | $ ./configure@ |
524 | $ sudo make install@ | 433 | $ sudo make install@ |
525 | $ cd .. | 434 | $ cd .. |
435 | @end example | ||
526 | 436 | ||
437 | @example | ||
527 | $ wget ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.0.tar.bz2@ | 438 | $ wget ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.6.0.tar.bz2@ |
528 | $ tar xf libgcrypt-1.6.0.tar.bz2@ | 439 | $ tar xf libgcrypt-1.6.0.tar.bz2@ |
529 | $ cd libgcrypt-1.6.0@ | 440 | $ cd libgcrypt-1.6.0@ |
530 | $ ./configure@ | 441 | $ ./configure@ |
531 | $ sudo make install@ | 442 | $ sudo make install@ |
532 | $ cd ..@ | 443 | $ cd ..@ |
444 | @end example | ||
533 | 445 | ||
534 | @node Install libgnurl | 446 | @node Install libgnurl |
535 | @subsection Install libgnurl | 447 | @subsection Install libgnurl |
536 | 448 | ||
449 | @example | ||
537 | $ wget https://gnunet.org/sites/default/files/gnurl-7.34.0.tar.bz2@ | 450 | $ wget https://gnunet.org/sites/default/files/gnurl-7.34.0.tar.bz2@ |
538 | $ tar xf gnurl-7.34.0.tar.bz2@ | 451 | $ tar xf gnurl-7.34.0.tar.bz2@ |
539 | $ cd gnurl-7.34.0@ | 452 | $ cd gnurl-7.34.0@ |
@@ -547,50 +460,62 @@ $ ./configure --enable-ipv6 --with-gnutls --without-libssh2 \ | |||
547 | --disable-gopher --disable-file --disable-ftp@ | 460 | --disable-gopher --disable-file --disable-ftp@ |
548 | $ sudo make install@ | 461 | $ sudo make install@ |
549 | $ cd ..@ | 462 | $ cd ..@ |
463 | @end example | ||
550 | 464 | ||
551 | @node Install libmicrohttpd from Git | 465 | @node Install libmicrohttpd from Git |
552 | @subsection Install libmicrohttpd from Git | 466 | @subsection Install libmicrohttpd from Git |
553 | 467 | ||
468 | @example | ||
554 | $ git clone https://gnunet.org/git/libmicrohttpd@ | 469 | $ git clone https://gnunet.org/git/libmicrohttpd@ |
555 | $ cd libmicrohttpd/@ | 470 | $ cd libmicrohttpd/@ |
556 | $ ./bootstrap@ | 471 | $ ./bootstrap@ |
557 | $ ./configure@ | 472 | $ ./configure@ |
558 | $ sudo make install@ | 473 | $ sudo make install@ |
559 | $ cd ..@ | 474 | $ cd ..@ |
475 | @end example | ||
560 | 476 | ||
561 | @node Install libextractor from Git | 477 | @node Install libextractor from Git |
562 | @subsection Install libextractor from Git | 478 | @subsection Install libextractor from Git |
563 | 479 | ||
564 | Install libextractor dependencies:@ | 480 | Install libextractor dependencies:@ |
565 | 481 | ||
482 | @example | ||
566 | $ sudo apt-get install zlib1g-dev libgsf-1-dev libmpeg2-4-dev libpoppler-dev \ | 483 | $ sudo apt-get install zlib1g-dev libgsf-1-dev libmpeg2-4-dev libpoppler-dev \ |
567 | libvorbis-dev libexiv2-dev libjpeg-dev libtiff-dev libgif-dev libvorbis-dev \ | 484 | libvorbis-dev libexiv2-dev libjpeg-dev libtiff-dev libgif-dev libvorbis-dev \ |
568 | libflac-dev libsmf-dev g++@ | 485 | libflac-dev libsmf-dev g++@ |
486 | @end example | ||
569 | 487 | ||
570 | Build libextractor:@ | 488 | Build libextractor:@ |
571 | 489 | ||
490 | @example | ||
572 | $ git clone https://gnunet.org/git/libextractor@ | 491 | $ git clone https://gnunet.org/git/libextractor@ |
573 | $ cd libextractor@ | 492 | $ cd libextractor@ |
574 | $ ./bootstrap@ | 493 | $ ./bootstrap@ |
575 | $ ./configure@ | 494 | $ ./configure@ |
576 | $ sudo make install@ | 495 | $ sudo make install@ |
577 | $ cd ..@ | 496 | $ cd ..@ |
497 | @end example | ||
578 | 498 | ||
579 | @node Install GNUnet dependencies | 499 | @node Install GNUnet dependencies |
580 | @subsection Install GNUnet dependencies | 500 | @subsection Install GNUnet dependencies |
581 | 501 | ||
502 | @example | ||
582 | $ sudo apt-get install libidn11-dev libunistring-dev libglpk-dev \ | 503 | $ sudo apt-get install libidn11-dev libunistring-dev libglpk-dev \ |
583 | libpulse-dev libbluetooth-dev libsqlite-dev@ | 504 | libpulse-dev libbluetooth-dev libsqlite-dev@ |
505 | @end example | ||
584 | 506 | ||
585 | Install libopus@ | 507 | Install libopus@ |
586 | 508 | ||
509 | @example | ||
587 | $ wget http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz@ | 510 | $ wget http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz@ |
588 | $ tar xf opus-1.1.tar.gz@ | 511 | $ tar xf opus-1.1.tar.gz@ |
589 | $ cd opus-1.1/@ | 512 | $ cd opus-1.1/@ |
590 | $ ./configure@ | 513 | $ ./configure@ |
591 | $ sudo make install@ | 514 | $ sudo make install@ |
515 | @end example | ||
592 | 516 | ||
593 | Choose one or more database backends@ | 517 | Choose one or more database backends@ |
518 | |||
594 | @itemize @bullet | 519 | @itemize @bullet |
595 | 520 | ||
596 | @item | 521 | @item |
@@ -1265,15 +1190,14 @@ and Postgres better resillience. | |||
1265 | This chapter contains a collection of outdated, older installation guides. They | 1190 | This chapter contains a collection of outdated, older installation guides. They |
1266 | are mostly intended to serve as a starting point for writing up-to-date | 1191 | are mostly intended to serve as a starting point for writing up-to-date |
1267 | instructions and should not be expected to work for GNUnet 0.10.x. | 1192 | instructions and should not be expected to work for GNUnet 0.10.x. |
1193 | A set of older installation instructions can also be found in the | ||
1194 | @file{doc/outdated-and-old-installation-instructions.txt} in the source | ||
1195 | of GNUnet. This file covers old instructions which no longer receive | ||
1196 | security updates or any kind of support. | ||
1268 | 1197 | ||
1269 | 1198 | ||
1270 | @menu | 1199 | @menu |
1271 | * Installing GNUnet 0.10.1 on Ubuntu 14.04:: | 1200 | * Installing GNUnet 0.10.1 on Ubuntu 14.04:: |
1272 | * Build instructions for FreeBSD 8:: | ||
1273 | * Basic installation for Mac OS X:: | ||
1274 | * Basic Installation for Fedora/PlanetLab nodes running Fedora 12:: | ||
1275 | * Basic Installation for Fedora/PlanetLab nodes running Fedora 8 .:: | ||
1276 | * Build instructions for Gentoo:: | ||
1277 | * Building GLPK for MinGW:: | 1201 | * Building GLPK for MinGW:: |
1278 | * GUI build instructions for Ubuntu 12.04 using Subversion:: | 1202 | * GUI build instructions for Ubuntu 12.04 using Subversion:: |
1279 | * Installation with gnunet-update:: | 1203 | * Installation with gnunet-update:: |
@@ -1372,508 +1296,6 @@ After installing it, you need to create an empty configuration file:@ | |||
1372 | And finally you can start GNUnet with@ | 1296 | And finally you can start GNUnet with@ |
1373 | @code{$ gnunet-arm -s} | 1297 | @code{$ gnunet-arm -s} |
1374 | 1298 | ||
1375 | |||
1376 | @node Build instructions for FreeBSD 8 | ||
1377 | @subsection Build instructions for FreeBSD 8 | ||
1378 | |||
1379 | To get GNUnet 0.9 to compile on FreeBSD (at least FreeBSD 8.0):@ in order to | ||
1380 | install the library @code{libiconv}, at first change the directory to your | ||
1381 | ports directory, e.g.@ | ||
1382 | @code{@ | ||
1383 | $ cd /usr/ports/@ | ||
1384 | }@ | ||
1385 | following that, go to the install file of @code{libiconv} and install it,@ | ||
1386 | @code{@ | ||
1387 | $ cd converters/libiconv,@ | ||
1388 | $ make install@ | ||
1389 | } | ||
1390 | |||
1391 | after that, change the directory to where you will check out | ||
1392 | @code{libextractor} and GNUnet, and install latest @code{libextractor},@ | ||
1393 | first of all, checkout @code{libextractor}, e.g.@ | ||
1394 | @code{@ | ||
1395 | $ svn co https://gnunet.org/svn/Extractor@ | ||
1396 | }@ | ||
1397 | then change the directory into which it was checked out, e.g.@ | ||
1398 | @code{@ | ||
1399 | $ cd Extractor@ | ||
1400 | }@ | ||
1401 | before the installation, you should do following steps,@ | ||
1402 | |||
1403 | @example | ||
1404 | $ ./bootstrap@ | ||
1405 | $ ./configure --with-ltdl-include=/usr/local/include \ | ||
1406 | --with-ltdl-lib=/usr/local/lib@ | ||
1407 | @end example | ||
1408 | |||
1409 | if these steps complete successfully, you can install the library,@ | ||
1410 | |||
1411 | @example | ||
1412 | $ make install@ | ||
1413 | @end example | ||
1414 | |||
1415 | to check out the GNUnet, you should do the similar steps as | ||
1416 | @code{libextractor}, firstly, change back to starting directory, e.g.@ | ||
1417 | @code{@ | ||
1418 | $ cd ../@ | ||
1419 | }@ | ||
1420 | Set the following environmental variables:@ | ||
1421 | @code{@ | ||
1422 | export CPPFLAGS="-I/usr/local/include"@ | ||
1423 | export LDFLAGS="-L/usr/local/lib"@ | ||
1424 | }@ | ||
1425 | next, checkout GNUnet using@ | ||
1426 | @code{@ | ||
1427 | $ svn co https://gnunet.org/svn/gnunet@ | ||
1428 | }@ | ||
1429 | then change directory into newly checked out directory,@ | ||
1430 | @code{@ | ||
1431 | $ cd gnunet@ | ||
1432 | }@ | ||
1433 | at last, start to install GNUnet,@ | ||
1434 | |||
1435 | @example | ||
1436 | $ ./bootstrap@ | ||
1437 | $ ./configure --with-ltdl-include=/usr/local/include \ | ||
1438 | --with-ltdl-lib=/usr/local/lib --with-extractor=/usr/local | ||
1439 | |||
1440 | ## NOTE: you may not need the --with-extractor option!@ | ||
1441 | |||
1442 | $ make install | ||
1443 | @end example | ||
1444 | |||
1445 | @node Basic installation for Mac OS X | ||
1446 | @subsection Basic installation for Mac OS X | ||
1447 | |||
1448 | This documentation may be outdated! | ||
1449 | |||
1450 | This page is providing guidelines for users trying to install GNUnet on Mac OS | ||
1451 | X.@ Mainly users trying to install GNUnet by building source code are the most | ||
1452 | welcome readers.@ The steps below are tested on an Intel Architecture running | ||
1453 | Mac OS X Tiger (10.4.11). Ideally they should work on other Mac boxes with | ||
1454 | different configurations as all the configuration done for it is dependent on | ||
1455 | @uref{http://www.macports.org/, MacPorts} | ||
1456 | |||
1457 | For having GNUnet installed successfully, some dependencies should be firstly | ||
1458 | resolved: | ||
1459 | |||
1460 | @itemize @bullet | ||
1461 | |||
1462 | @item | ||
1463 | Install/Update your @uref{http://developer.apple.com/tools/xcode/, Xcode} | ||
1464 | version 3.2.1 or later for Snow Leopard, 3.1.4 or later for Leopard, or 2.5 for | ||
1465 | Tiger. | ||
1466 | |||
1467 | @item | ||
1468 | Download and install @uref{http://www.macports.org/, MacPorts}.@ | ||
1469 | Now you are ready for installing GNunet dependencies. | ||
1470 | |||
1471 | @item | ||
1472 | First, you'd better make sure that: /opt/local/bin and /opt/local/sbin are | ||
1473 | available in your PATH. (For doing so, open a terminal and type:@ | ||
1474 | |||
1475 | @example | ||
1476 | $ echo $PATH | ||
1477 | @end example | ||
1478 | |||
1479 | and examine the output of it). If the paths are not available in your | ||
1480 | environment, you have to add them (You can add them by editing your .profile | ||
1481 | file in your home directory, append them to the PATH line). Then type: | ||
1482 | @example | ||
1483 | $ source ~/.profile | ||
1484 | @end example | ||
1485 | |||
1486 | and re-examine the echo command output. | ||
1487 | |||
1488 | @item | ||
1489 | Use MacPorts to download and install the dependencies:@ | ||
1490 | The libraries are: | ||
1491 | |||
1492 | @itemize @bullet | ||
1493 | |||
1494 | @item | ||
1495 | @uref{http://trac.macports.org/browser/trunk/dports/www/libmicrohttpd/Portfile, libmicrohttpd.} | ||
1496 | |||
1497 | @item | ||
1498 | @uref{http://trac.macports.org/browser/trunk/dports/devel/libgcrypt/Portfile, libgcrypt.} | ||
1499 | |||
1500 | @item | ||
1501 | @uref{http://trac.macports.org/browser/trunk/dports/net/curl/Portfile, libcurl.} | ||
1502 | |||
1503 | @item | ||
1504 | @uref{http://trac.macports.org/browser/trunk/dports/devel/libtool/Portfile, libltdl.} | ||
1505 | |||
1506 | @item | ||
1507 | @uref{http://trac.macports.org/browser/trunk/dports/databases/sqlite3/Portfile, SQlite.} | ||
1508 | |||
1509 | @item | ||
1510 | libunistring | ||
1511 | |||
1512 | @item | ||
1513 | glpk | ||
1514 | |||
1515 | @end itemize | ||
1516 | |||
1517 | The port command is as follows:@ | ||
1518 | @example | ||
1519 | port install libmicrohttpd libgcrypt curl libtool sqlite3 linunistring glpk | ||
1520 | @end example | ||
1521 | One of the dependencies, the libextractor, should be explicitly installed, | ||
1522 | since the version available from macports is outdated to work with GNUnet. To | ||
1523 | install the latest libextractor: | ||
1524 | @itemize @bullet | ||
1525 | |||
1526 | |||
1527 | @item | ||
1528 | Install the Subversion Client:@ | ||
1529 | For more information about Subversion visit: | ||
1530 | @uref{http://subversion.tigris.org/, http://subversion.tigris.org/} | ||
1531 | |||
1532 | @example | ||
1533 | # port install subversion | ||
1534 | @end example | ||
1535 | |||
1536 | |||
1537 | @item | ||
1538 | Use Subversion to download the latest Extractor: | ||
1539 | @example | ||
1540 | $ svn checkout https://gnunet.org/svn/Extractor | ||
1541 | @end example | ||
1542 | |||
1543 | |||
1544 | @item | ||
1545 | Go to the installation directory of the Extractor, compile and install it: | ||
1546 | @example | ||
1547 | $ ./bootstrap | ||
1548 | $ export CPPFLAGS="-I/opt/local/include" | ||
1549 | $ export LDFLAGS="-L/opt/local/lib" | ||
1550 | $ ./configure --prefix=/opt/local | ||
1551 | $ make | ||
1552 | # make install | ||
1553 | @end example | ||
1554 | |||
1555 | @end itemize | ||
1556 | |||
1557 | |||
1558 | @item | ||
1559 | Now, your system is ready to install GNunet. If you downloaded GNUnet by | ||
1560 | checking it out from svn, you should start by running the bootstrap script. | ||
1561 | Open a terminal pointing to the GNUnet directory and type:@ | ||
1562 | |||
1563 | @example | ||
1564 | $ ./bootstrap | ||
1565 | @end example | ||
1566 | |||
1567 | |||
1568 | @item | ||
1569 | Run the configure script: | ||
1570 | @example | ||
1571 | $ export CPPFLAGS="-I/opt/local/include" | ||
1572 | $ export LDFLAGS="-L/opt/local/lib" | ||
1573 | $ ./configure --prefix=/tmp/gnunet_build | ||
1574 | @end example | ||
1575 | |||
1576 | |||
1577 | GNUnet will be installed in the directory /tmp/gnunet_build (Of course that | ||
1578 | installation path can be changed).@ The CPPFLAGS and LDFLAGS are mentioned in | ||
1579 | order to inform the compiler and the linker to lookup headers and libraries in | ||
1580 | /opt/local/include and /opt/local/lib. | ||
1581 | |||
1582 | @item | ||
1583 | Compile@ | ||
1584 | |||
1585 | @example | ||
1586 | $ make | ||
1587 | @end example | ||
1588 | |||
1589 | |||
1590 | @item | ||
1591 | Install GNUnet | ||
1592 | @example | ||
1593 | # make install | ||
1594 | @end example | ||
1595 | |||
1596 | @end itemize | ||
1597 | |||
1598 | @node Basic Installation for Fedora/PlanetLab nodes running Fedora 12 | ||
1599 | @subsection Basic Installation for Fedora/PlanetLab nodes running Fedora 12 | ||
1600 | |||
1601 | |||
1602 | @strong{This documentation is outdated and not valid for GNUnet 0.10.0!}@ | ||
1603 | |||
1604 | GNUnet installation on Fedora 8/Planetlab nodes can be done as following: | ||
1605 | |||
1606 | 1. Install the build tools to build GNUnet@ | ||
1607 | @example | ||
1608 | sudo yum -y -t --nogpgcheck install gcc make autoconf gettext-devel \ | ||
1609 | texinfo subversion@ | ||
1610 | @end example | ||
1611 | |||
1612 | 2. Install the GNUnet dependencies@ | ||
1613 | @example | ||
1614 | sudo yum -y -t --nogpgcheck install libunistring-devel libunistring-devel \ | ||
1615 | libgcrypt-devel zlib-devel sqlite-devel postgresql-devel mysql-devel \ | ||
1616 | libgsf-devel libvorbis-devel@ | ||
1617 | @end example | ||
1618 | |||
1619 | 3. Install outdated dependencies from source@ | ||
1620 | libtool@ | ||
1621 | @example | ||
1622 | wget http://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz@ | ||
1623 | tar xvfz libtool-2.4.2.tar.gz@ | ||
1624 | cd libtool-2.4.2@ | ||
1625 | ./configure@ | ||
1626 | sudo make install@ | ||
1627 | @end example | ||
1628 | |||
1629 | glpk@ | ||
1630 | @example | ||
1631 | wget http://ftp.gnu.org/gnu/glpk/glpk-4.47.tar.gz@ | ||
1632 | tar xvfz glpk-4.47.tar.gz@ | ||
1633 | cd glpk-4.47@ | ||
1634 | ./configure@ | ||
1635 | sudo make install@ | ||
1636 | @end example | ||
1637 | |||
1638 | libcurl@ | ||
1639 | @example | ||
1640 | wget http://curl.haxx.se/download/curl-7.26.0.tar.gz@ | ||
1641 | tar xvfz curl-7.26.0.tar.gz@ | ||
1642 | cd curl-7.26.0@ | ||
1643 | ./configure@ | ||
1644 | sudo make install@ | ||
1645 | @end example | ||
1646 | |||
1647 | 4. Install libextractor@ | ||
1648 | @example | ||
1649 | svn co https://gnunet.org/svn/libextractor@ | ||
1650 | cd libextractor@ | ||
1651 | libtoolize@ | ||
1652 | ./bootstrap@ | ||
1653 | ./configure@ | ||
1654 | sudo make install@ | ||
1655 | @end example | ||
1656 | |||
1657 | 5. Install libmicrohttpd@ | ||
1658 | @example | ||
1659 | svn co https://gnunet.org/svn/libmicrohttpd@ | ||
1660 | cd libmicrohttpd@ | ||
1661 | libtoolize@ | ||
1662 | ./bootstrap@ | ||
1663 | ./configure@ | ||
1664 | sudo make install@ | ||
1665 | @end example | ||
1666 | |||
1667 | 6. Set GNUnet prefix and add to PATH@ | ||
1668 | @example | ||
1669 | export GNUNET_PREFIX=@ | ||
1670 | export PATH=$PATH:$GNUNET_PREFIX/bin@ | ||
1671 | @end example | ||
1672 | |||
1673 | 7. Install GNUnet from svn@ | ||
1674 | @example | ||
1675 | export LD_LIBRARY_PATH=/usr/local/lib@ | ||
1676 | svn co https://gnunet.org/svn/gnunet@ | ||
1677 | cd gnunet@ | ||
1678 | libtoolize@ | ||
1679 | ./bootstrap@ | ||
1680 | ./configure --prefix=$GNUNET_PREFIX --with-extractor=/usr \ | ||
1681 | --with-mysql=/usr/lib/mysql --enable-logging=verbose@ | ||
1682 | make install@ | ||
1683 | @end example | ||
1684 | |||
1685 | Done! | ||
1686 | |||
1687 | @node Basic Installation for Fedora/PlanetLab nodes running Fedora 8 . | ||
1688 | @subsection Basic Installation for Fedora/PlanetLab nodes running Fedora 8 . | ||
1689 | @c %**end of header | ||
1690 | |||
1691 | @strong{This documentation is outdated and not valid for GNUnet 0.10.0!}@ | ||
1692 | GNUnet installation on Fedora 8/Planetlab nodes can be done as following: | ||
1693 | |||
1694 | 1. Install the build tools to build GNUnet@ | ||
1695 | @example | ||
1696 | sudo yum -y -t --nogpgcheck install gcc make automake autoconf gettext-devel \ | ||
1697 | texinfo zlib-devel subversion@ | ||
1698 | @end example | ||
1699 | |||
1700 | 2. Install the GNUnet dependencies@ | ||
1701 | @example | ||
1702 | sudo yum -y -t --nogpgcheck install gnutls-devel gnutls-devel libgcrypt-devel \ | ||
1703 | sqlite-devel postgresql-devel mysql-devel libgsf-devel libvorbis-devel \ | ||
1704 | libidn-devel | ||
1705 | @end example | ||
1706 | |||
1707 | 3. Install outdated dependencies from source@ | ||
1708 | libtool@ | ||
1709 | @code{@ | ||
1710 | wget http://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz@ | ||
1711 | tar xvfz libtool-2.4.2.tar.gz@ | ||
1712 | cd libtool-2.4.2@ | ||
1713 | ./configure@ | ||
1714 | sudo make install@ | ||
1715 | } | ||
1716 | |||
1717 | libtool@ | ||
1718 | @code{@ | ||
1719 | wget http://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz@ | ||
1720 | tar xvfz libtool-2.4.2.tar.gz@ | ||
1721 | cd libtool-2.4.2@ | ||
1722 | ./configure@ | ||
1723 | sudo make install@ | ||
1724 | } | ||
1725 | |||
1726 | glpk@ | ||
1727 | @code{@ | ||
1728 | wget http://ftp.gnu.org/gnu/glpk/glpk-4.47.tar.gz@ | ||
1729 | tar xvfz glpk-4.47.tar.gz@ | ||
1730 | cd glpk-4.47@ | ||
1731 | ./configure@ | ||
1732 | sudo make install@ | ||
1733 | } | ||
1734 | |||
1735 | libgpg-error@ | ||
1736 | @code{@ | ||
1737 | wget ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.10.tar.bz2@ | ||
1738 | tar xvfj libgpg-error-1.10.tar.bz2@ | ||
1739 | cd libgpg-error-1.10@ | ||
1740 | ./configure --prefix=/usr@ | ||
1741 | sudo make install@ | ||
1742 | } | ||
1743 | |||
1744 | libgcrypt@ | ||
1745 | @code{@ | ||
1746 | wget ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.5.0.tar.bz2@ | ||
1747 | tar xvfj libgcrypt-1.5.0.tar.tar.bz2@ | ||
1748 | cd libgcrypt-1.5.0@ | ||
1749 | ./configure --prefix=/usr@ | ||
1750 | sudo make install@ | ||
1751 | } | ||
1752 | |||
1753 | libcurl@ | ||
1754 | @code{@ | ||
1755 | wget http://curl.haxx.se/download/curl-7.26.0.tar.gz@ | ||
1756 | tar xvfz curl-7.26.0.tar.gz@ | ||
1757 | cd curl-7.26.0@ | ||
1758 | ./configure@ | ||
1759 | sudo make install@ | ||
1760 | } | ||
1761 | |||
1762 | libunistring@ | ||
1763 | @code{@ | ||
1764 | wget http://ftp.gnu.org/gnu/libunistring/libunistring-0.9.3.tar.gz@ | ||
1765 | tar xvfz libunistring-0.9.3.tar.gz@ | ||
1766 | cd libunistring-0.9.3@ | ||
1767 | ./configure@ | ||
1768 | sudo make install@ | ||
1769 | } | ||
1770 | |||
1771 | 4. Remove conflicting packages@ | ||
1772 | @code{@ | ||
1773 | sudo rpm -e --nodeps libgcrypt libgpg-error@ | ||
1774 | } | ||
1775 | |||
1776 | 4. Install libextractor@ | ||
1777 | @code{@ | ||
1778 | wget ftp://ftp.gnu.org/gnu/libextractor/libextractor-0.6.3.tar.gz@ | ||
1779 | tar xvfz libextractor-0.6.3.tar.gz@ | ||
1780 | cd libextractor-0.6.3@ | ||
1781 | ./configure@ | ||
1782 | sudo make install@ | ||
1783 | } | ||
1784 | |||
1785 | 5. Install libmicrohttpd and dependencies | ||
1786 | |||
1787 | nettle@ | ||
1788 | @code{@ | ||
1789 | wget http://ftp.gnu.org/gnu/nettle/nettle-2.5.tar.gz@ | ||
1790 | tar xvfz nettle-2.5.tar.gz@ | ||
1791 | cd nettle-2.5@ | ||
1792 | ./configure@ | ||
1793 | sudo make install@ | ||
1794 | } | ||
1795 | |||
1796 | GnuTLS@ | ||
1797 | @code{@ | ||
1798 | wget http://ftp.gnu.org/gnu/gnutls/gnutls-2.12.20.tar.bz2@ | ||
1799 | tar xvfj gnutls-2.12.20.tar.bz2@ | ||
1800 | cd gnutls-2.12.20@ | ||
1801 | ./configure --without-p11-kit@ | ||
1802 | sudo make install@ | ||
1803 | } | ||
1804 | |||
1805 | libmicrohttpd@ | ||
1806 | @code{@ | ||
1807 | wget ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.21.tar.gz@ | ||
1808 | tar xvfz libmicrohttpd-0.9.21.tar.gz@ | ||
1809 | cd libmicrohttpd-0.9.21@ | ||
1810 | ./configure@ | ||
1811 | sudo make install@ | ||
1812 | } | ||
1813 | |||
1814 | 6. Set GNUnet prefix and add to PATH@ | ||
1815 | @code{@ | ||
1816 | export GNUNET_PREFIX=@ | ||
1817 | export PATH=$PATH:$GNUNET_PREFIX/bin@ | ||
1818 | } | ||
1819 | |||
1820 | 7. Install GNUnet from svn@ | ||
1821 | @example | ||
1822 | export LD_LIBRARY_PATH=/usr/local/lib@ | ||
1823 | svn co https://gnunet.org/svn/gnunet@ | ||
1824 | cd gnunet@ | ||
1825 | libtoolize@ | ||
1826 | ./bootstrap@ | ||
1827 | ./configure --prefix=$GNUNET_PREFIX --with-extractor=/usr/local \ | ||
1828 | --with-curl=/usr/local --with-mysql=/usr/lib/mysql --enable-logging=verbose@ | ||
1829 | make install@ | ||
1830 | @end example | ||
1831 | |||
1832 | Done! | ||
1833 | |||
1834 | @node Build instructions for Gentoo | ||
1835 | @subsection Build instructions for Gentoo | ||
1836 | |||
1837 | |||
1838 | This page describes how to install GNUnet 0.9 on Gentoo. | ||
1839 | |||
1840 | Since the GNUnet 0.9 ebuilds are not in the official portage tree yet, we need | ||
1841 | to add them to the local portage overlay. All the commands below should be | ||
1842 | executed as root. | ||
1843 | |||
1844 | Specify your local portage directory in the /etc/make.conf, for example:@ | ||
1845 | @code{$ echo 'PORTDIR_OVERLAY="/usr/local/portage"' >> /etc/make.conf} | ||
1846 | |||
1847 | Create directories for the ebuilds:@ | ||
1848 | @code{$ mkdir -p /usr/local/portage/media-libs/libextractor /usr/local/portage/net-p2p/gnunet/files} | ||
1849 | |||
1850 | Download the latest ebuilds, init and config files from here and put them into | ||
1851 | respective directories:@ | ||
1852 | @code{$ cp libextractor-0.6.2.ebuild /usr/local/portage/media-libs/libextractor@ | ||
1853 | $ cp gnunet-0.9.2.ebuild /usr/local/portage/net-p2p/gnunet@ | ||
1854 | $ cp gnunet-0.9.2.conf gnunet-0.9.2.confd gnunet-0.9.2.initd /usr/local/portage/net-p2p/gnunet/files} | ||
1855 | |||
1856 | Generate Manifest files for the ebuilds:@ | ||
1857 | @code{$ cd /usr/local/portage/net-p2p/gnunet@ | ||
1858 | $ ebuild gnunet-0.9.2.ebuild digest@ | ||
1859 | $ cd /usr/local/portage/media-libs/libextractor@ | ||
1860 | $ ebuild libextractor-0.6.2.ebuild digest} | ||
1861 | |||
1862 | Unmask GNUnet and dependencies in the /etc/portage/package.keywords. For | ||
1863 | example, if you use x86-64 architecture, add the following lines:@ | ||
1864 | @code{net-p2p/gnunet ~amd64@ | ||
1865 | media-libs/libextractor ~amd64@ | ||
1866 | net-libs/libmicrohttpd ~amd64@ | ||
1867 | net-misc/curl ~amd64} | ||
1868 | |||
1869 | Add either sqlite or mysql USE-flag in the /etc/portage/package.use:@ | ||
1870 | @code{net-p2p/gnunet sqlite} | ||
1871 | |||
1872 | Now everything is ready to install GNUnet:@ | ||
1873 | @code{$ emerge -av gnunet} | ||
1874 | |||
1875 | Use /etc/init.d/gnunet to start/stop GNUnet. | ||
1876 | |||
1877 | @node Building GLPK for MinGW | 1299 | @node Building GLPK for MinGW |
1878 | @subsection Building GLPK for MinGW | 1300 | @subsection Building GLPK for MinGW |
1879 | 1301 | ||
@@ -3897,13 +3319,13 @@ connecting to NATed peers using ICMP method" box. | |||
3897 | @node Peer configuration for distributions | 3319 | @node Peer configuration for distributions |
3898 | @subsection Peer configuration for distributions | 3320 | @subsection Peer configuration for distributions |
3899 | 3321 | ||
3900 | The "GNUNET_DATA_HOME" in "[path]" in /etc/gnunet.conf should be manually set | 3322 | The "GNUNET_DATA_HOME" in "[path]" in @file{/etc/gnunet.conf} should be manually set |
3901 | to "/var/lib/gnunet/data/" as the default "~/.local/share/gnunet/" is probably | 3323 | to "/var/lib/gnunet/data/" as the default "~/.local/share/gnunet/" is probably |
3902 | not that appropriate in this case. Similarly, distributions may consider | 3324 | not that appropriate in this case. Similarly, distributions may consider |
3903 | pointing "GNUNET_RUNTIME_DIR" to "/var/run/gnunet/" and "GNUNET_HOME" to | 3325 | pointing "GNUNET_RUNTIME_DIR" to "/var/run/gnunet/" and "GNUNET_HOME" to |
3904 | "/var/lib/gnunet/". Also, should a distribution decide to override system | 3326 | "/var/lib/gnunet/". Also, should a distribution decide to override system |
3905 | defaults, all of these changes should be done in a custom "/etc/gnunet.conf" | 3327 | defaults, all of these changes should be done in a custom @file{/etc/gnunet.conf} |
3906 | and not in the files in the "config.d/" directory. | 3328 | and not in the files in the @file{config.d/} directory. |
3907 | 3329 | ||
3908 | Given the proposed access permissions, the "gnunet-setup" tool must be run as | 3330 | Given the proposed access permissions, the "gnunet-setup" tool must be run as |
3909 | use "gnunet" (and with option "-c /etc/gnunet.conf" so that it modifies the | 3331 | use "gnunet" (and with option "-c /etc/gnunet.conf" so that it modifies the |
@@ -3922,7 +3344,7 @@ This section describes how to start a GNUnet peer. It assumes that you have | |||
3922 | already compiled and installed GNUnet and its' dependencies. Before you start a | 3344 | already compiled and installed GNUnet and its' dependencies. Before you start a |
3923 | GNUnet peer, you may want to create a configuration file using gnunet-setup | 3345 | GNUnet peer, you may want to create a configuration file using gnunet-setup |
3924 | (but you do not have to). Sane defaults should exist in your | 3346 | (but you do not have to). Sane defaults should exist in your |
3925 | @code{GNUNET_PREFIX/share/gnunet/config.d/} directory, so in practice you could | 3347 | @file{$GNUNET_PREFIX/share/gnunet/config.d/} directory, so in practice you could |
3926 | simply start without any configuration. If you want to configure your peer | 3348 | simply start without any configuration. If you want to configure your peer |
3927 | later, you need to stop it before invoking the @code{gnunet-setup} tool to | 3349 | later, you need to stop it before invoking the @code{gnunet-setup} tool to |
3928 | customize further and to test your configuration (@code{gnunet-setup} has | 3350 | customize further and to test your configuration (@code{gnunet-setup} has |
@@ -3954,12 +3376,12 @@ recommended. | |||
3954 | 3376 | ||
3955 | For the single-user setup, you do not need to do anything special and can just | 3377 | For the single-user setup, you do not need to do anything special and can just |
3956 | start the GNUnet background processes using @code{gnunet-arm}. By default, | 3378 | start the GNUnet background processes using @code{gnunet-arm}. By default, |
3957 | GNUnet looks in @code{~/.config/gnunet.conf} for a configuration (or | 3379 | GNUnet looks in @file{~/.config/gnunet.conf} for a configuration (or |
3958 | $XDG_CONFIG_HOME/gnunet.conf if@ $XDG_CONFIG_HOME is defined). If your | 3380 | @code{$XDG_CONFIG_HOME/gnunet.conf} if@ @code{$XDG_CONFIG_HOME} is defined). If your |
3959 | configuration lives elsewhere, you need to pass the @code{-c FILENAME} option | 3381 | configuration lives elsewhere, you need to pass the @code{-c FILENAME} option |
3960 | to all GNUnet commands. | 3382 | to all GNUnet commands. |
3961 | 3383 | ||
3962 | Assuming the configuration file is called @code{~/.config/gnunet.conf}, you | 3384 | Assuming the configuration file is called @file{~/.config/gnunet.conf}, you |
3963 | start your peer using the @code{gnunet-arm} command (say as user | 3385 | start your peer using the @code{gnunet-arm} command (say as user |
3964 | @code{gnunet}) using: | 3386 | @code{gnunet}) using: |
3965 | @example | 3387 | @example |
@@ -4017,7 +3439,7 @@ to automatically start your peer whenever your system boots. | |||
4017 | 3439 | ||
4018 | This requires you to create a user @code{gnunet} and an additional group | 3440 | This requires you to create a user @code{gnunet} and an additional group |
4019 | @code{gnunetdns}, prior to running @code{make install} during installation. | 3441 | @code{gnunetdns}, prior to running @code{make install} during installation. |
4020 | Then, you create a configuration file @code{/etc/gnunet.conf} which should | 3442 | Then, you create a configuration file @file{/etc/gnunet.conf} which should |
4021 | contain the lines:@ | 3443 | contain the lines:@ |
4022 | @code{@ | 3444 | @code{@ |
4023 | [arm]@ | 3445 | [arm]@ |
@@ -4029,7 +3451,7 @@ contain the lines:@ | |||
4029 | may also want to run @code{gnunet-setup} to configure your peer (databases, | 3451 | may also want to run @code{gnunet-setup} to configure your peer (databases, |
4030 | etc.). Make sure to pass @code{-c /etc/gnunet.conf} to all commands. If you | 3452 | etc.). Make sure to pass @code{-c /etc/gnunet.conf} to all commands. If you |
4031 | run @code{gnunet-setup} as user @code{gnunet}, you might need to change | 3453 | run @code{gnunet-setup} as user @code{gnunet}, you might need to change |
4032 | permissions on @code{/etc/gnunet.conf} so that the @code{gnunet} user can | 3454 | permissions on @file{/etc/gnunet.conf} so that the @code{gnunet} user can |
4033 | write to the file (during setup). | 3455 | write to the file (during setup). |
4034 | 3456 | ||
4035 | Afterwards, you need to perform another setup step for each normal user account | 3457 | Afterwards, you need to perform another setup step for each normal user account |
@@ -4038,7 +3460,7 @@ from which you want to access GNUnet. First, grant the normal user | |||
4038 | @code{@ | 3460 | @code{@ |
4039 | # adduser $USER gnunet@ | 3461 | # adduser $USER gnunet@ |
4040 | }@ | 3462 | }@ |
4041 | Then, create a configuration file in @code{~/.config/gnunet.conf} for the $USER | 3463 | Then, create a configuration file in @file{~/.config/gnunet.conf} for the $USER |
4042 | with the lines:@ | 3464 | with the lines:@ |
4043 | @code{@ | 3465 | @code{@ |
4044 | [arm]@ | 3466 | [arm]@ |
@@ -4148,9 +3570,9 @@ service. | |||
4148 | GNUnet's main services should be run as a separate user "gnunet" in a special | 3570 | GNUnet's main services should be run as a separate user "gnunet" in a special |
4149 | group "gnunet". The user "gnunet" should start the peer using "gnunet-arm -s" | 3571 | group "gnunet". The user "gnunet" should start the peer using "gnunet-arm -s" |
4150 | during system startup. The home directory for this user should be | 3572 | during system startup. The home directory for this user should be |
4151 | "/var/lib/gnunet" and the configuration file should be "/etc/gnunet.conf". Only | 3573 | @file{/var/lib/gnunet} and the configuration file should be @file{/etc/gnunet.conf}. |
4152 | the "gnunet" user should have the right to access "/var/lib/gnunet" (mode: | 3574 | Only the @code{gnunet} user should have the right to access @file{/var/lib/gnunet} |
4153 | 700). | 3575 | (@emph{mode: 700}). |
4154 | 3576 | ||
4155 | @node Recommendation - Control access to services using group "gnunet" | 3577 | @node Recommendation - Control access to services using group "gnunet" |
4156 | @subsubsection Recommendation - Control access to services using group "gnunet" | 3578 | @subsubsection Recommendation - Control access to services using group "gnunet" |
@@ -4201,4 +3623,3 @@ that group already exists (!). An alternative name for the "gnunetdns" group | |||
4201 | can be specified using the "--with-gnunetdns=GRPNAME" configure | 3623 | can be specified using the "--with-gnunetdns=GRPNAME" configure |
4202 | option. | 3624 | option. |
4203 | 3625 | ||
4204 | |||
diff --git a/doc/chapters/philosophy.texi b/doc/chapters/philosophy.texi index 1696b2e64..9f4702b49 100644 --- a/doc/chapters/philosophy.texi +++ b/doc/chapters/philosophy.texi | |||
@@ -31,20 +31,15 @@ These are the core GNUnet design goals, in order of relative importance: | |||
31 | 31 | ||
32 | @itemize | 32 | @itemize |
33 | @item GNUnet must be implemented as free software. | 33 | @item GNUnet must be implemented as free software. |
34 | @item The GNUnet must only disclose the minimal amount of information | 34 | @item GNUnet must only disclose the minimal amount of information necessary. |
35 | necessary. | 35 | @item GNUnet must be decentralised and survive Byzantine failures in any position in the network. |
36 | @item The GNUnet must be decentralised and survive Byzantine failures | 36 | @item GNUnet must make it explicit to the user which entities must be trustworthy when establishing secured communications. |
37 | in any position in the network. | 37 | @item GNUnet must use compartmentalization to protect sensitive information. |
38 | @item The GNUnet must make it explicit to the user which entities must be | 38 | @item GNUnet must be open and permit new peers to join. |
39 | trustworthy when establishing secured communications. | 39 | @item GNUnet must be self-organizing and not depend on administrators. |
40 | @item The GNUnet must use compartmentalization to protect sensitive | 40 | @item GNUnet must support a diverse range of applications and devices. |
41 | information. | ||
42 | @item The GNUnet must be open and permit new peers to join. | ||
43 | @item The GNUnet must be self-organizing and not depend on administrators. | ||
44 | @item The GNUnet must support a diverse range of applications and devices. | ||
45 | @item The GNUnet architecture must be cost effective. | 41 | @item The GNUnet architecture must be cost effective. |
46 | @item The GNUnet must provide incentives for peers to contribute more | 42 | @item GNUnet must provide incentives for peers to contribute more resources than they consume. |
47 | resources than they consume. | ||
48 | @end itemize | 43 | @end itemize |
49 | 44 | ||
50 | 45 | ||
@@ -164,7 +159,7 @@ different addresses. Binding messages expire after at most a week (the | |||
164 | timeout can be shorter if the user configures the node appropriately). This | 159 | timeout can be shorter if the user configures the node appropriately). This |
165 | expiration ensures that the network will eventually get rid of outdated | 160 | expiration ensures that the network will eventually get rid of outdated |
166 | advertisements.@ | 161 | advertisements.@ |
167 | More details can be found in this paper. | 162 | More details can be found in the paper @uref{https://gnunet.org/transports, A Transport Layer Abstraction for Peer-to-Peer Networks}. |
168 | 163 | ||
169 | @node Accounting to Encourage Resource Sharing | 164 | @node Accounting to Encourage Resource Sharing |
170 | @subsection Accounting to Encourage Resource Sharing | 165 | @subsection Accounting to Encourage Resource Sharing |
@@ -192,7 +187,7 @@ request a (possibly lower) effective priority. Then, they drop the requests | |||
192 | with the lowest effective priority to satisfy their resource constraints. This | 187 | with the lowest effective priority to satisfy their resource constraints. This |
193 | way, GNUnet's economic model ensures that nodes that are not currently | 188 | way, GNUnet's economic model ensures that nodes that are not currently |
194 | considered to have a surplus in contributions will not be served if the | 189 | considered to have a surplus in contributions will not be served if the |
195 | network load is high. More details can be found in this paper. | 190 | network load is high. More details can be found in @uref{https://gnunet.org/ebe, this paper}. |
196 | 191 | ||
197 | @node Confidentiality | 192 | @node Confidentiality |
198 | @subsection Confidentiality | 193 | @subsection Confidentiality |
@@ -213,16 +208,20 @@ anonymous file sharing). | |||
213 | @node Anonymity | 208 | @node Anonymity |
214 | @subsection Anonymity | 209 | @subsection Anonymity |
215 | 210 | ||
211 | @menu | ||
212 | * How file-sharing achieves Anonymity:: | ||
213 | @end menu | ||
214 | |||
216 | Providing anonymity for users is the central goal for the anonymous | 215 | Providing anonymity for users is the central goal for the anonymous |
217 | file-sharing application. Many other design decisions follow in the footsteps | 216 | file-sharing application. Many other design decisions follow in the footsteps |
218 | of this requirement. Anonymity is never absolute. While there are various | 217 | of this requirement. Anonymity is never absolute. While there are various |
219 | scientific metrics that can help quantify the level of anonymity that a | 218 | @uref{https://gnunet.org/anonymity_metric, scientific metrics} that can help quantify the level of anonymity that a |
220 | given mechanism provides, there is no such thing as complete anonymity. | 219 | given mechanism provides, there is no such thing as complete anonymity. |
221 | GNUnet's file-sharing implementation allows users to select for each | 220 | GNUnet's file-sharing implementation allows users to select for each |
222 | operation (publish, search, download) the desired level of anonymity. | 221 | operation (publish, search, download) the desired level of anonymity. |
223 | The metric used is the amount of cover traffic available to hide the request. | 222 | The metric used is the amount of cover traffic available to hide the request. |
224 | While this metric is not as good as, for example, the theoretical metric | 223 | While this metric is not as good as, for example, the theoretical metric |
225 | given in scientific metrics, it is probably the best metric available to | 224 | given in @uref{https://gnunet.org/anonymity_metric, scientific metrics}, it is probably the best metric available to |
226 | a peer with a purely local view of the world that does not rely on unreliable | 225 | a peer with a purely local view of the world that does not rely on unreliable |
227 | external information. The default anonymity level is 1, which uses anonymous | 226 | external information. The default anonymity level is 1, which uses anonymous |
228 | routing but imposes no minimal requirements on cover traffic. It is possible | 227 | routing but imposes no minimal requirements on cover traffic. It is possible |
@@ -264,7 +263,7 @@ have to indirect the replies if we don't think we need more traffic to hide | |||
264 | our own actions.@ | 263 | our own actions.@ |
265 | 264 | ||
266 | This increases the efficiency of the network as we can indirect less under | 265 | This increases the efficiency of the network as we can indirect less under |
267 | higher load. More details can be found in this paper. | 266 | higher load. More details can be found in @uref{https://gnunet.org/gap, this paper}. |
268 | 267 | ||
269 | @node Deniability | 268 | @node Deniability |
270 | @subsection Deniability | 269 | @subsection Deniability |
@@ -283,7 +282,7 @@ encryption as the link-encryption between the nodes. GNUnet has | |||
283 | encryption on the network layer (link encryption, confidentiality, | 282 | encryption on the network layer (link encryption, confidentiality, |
284 | authentication) and again on the application layer (provided | 283 | authentication) and again on the application layer (provided |
285 | by @command{gnunet-publish}, @command{gnunet-download}, @command{gnunet-search} | 284 | by @command{gnunet-publish}, @command{gnunet-download}, @command{gnunet-search} |
286 | and @command{gnunet-gtk}). More details can be found here. | 285 | and @command{gnunet-gtk}). More details can be found @uref{https://gnunet.org/encoding, here}. |
287 | 286 | ||
288 | @node Peer Identities | 287 | @node Peer Identities |
289 | @subsection Peer Identities | 288 | @subsection Peer Identities |
diff --git a/doc/chapters/user.texi b/doc/chapters/user.texi index 94f1ba1ee..2a8c899b9 100644 --- a/doc/chapters/user.texi +++ b/doc/chapters/user.texi | |||
@@ -45,8 +45,12 @@ please study the installation and configuration handbooks. | |||
45 | 45 | ||
46 | First, you should launch @code{gnunet-gtk}, the graphical user interface for | 46 | First, you should launch @code{gnunet-gtk}, the graphical user interface for |
47 | GNUnet which will be used for most of the tutorial. You can do this from the | 47 | GNUnet which will be used for most of the tutorial. You can do this from the |
48 | command-line by typing@ | 48 | command-line by typing |
49 | @code{@ $ gnunet-gtk}@ | 49 | |
50 | @example | ||
51 | $ gnunet-gtk | ||
52 | @end example | ||
53 | |||
50 | (note that @code{$} represents the prompt of the shell for a normal user). | 54 | (note that @code{$} represents the prompt of the shell for a normal user). |
51 | Depending on your distribution, you may also find @code{gnunet-gtk} in your | 55 | Depending on your distribution, you may also find @code{gnunet-gtk} in your |
52 | menus. After starting @code{gnunet-gtk}, you should see the following window: | 56 | menus. After starting @code{gnunet-gtk}, you should see the following window: |
@@ -55,6 +59,7 @@ menus. After starting @code{gnunet-gtk}, you should see the following window: | |||
55 | 59 | ||
56 | The five images on top represent the five different graphical applications that | 60 | The five images on top represent the five different graphical applications that |
57 | you can use within @code{gnunet-gtk}. They are (from left to right): | 61 | you can use within @code{gnunet-gtk}. They are (from left to right): |
62 | |||
58 | @itemize @bullet | 63 | @itemize @bullet |
59 | @item Statistics | 64 | @item Statistics |
60 | @item Peer Information | 65 | @item Peer Information |
@@ -119,9 +124,13 @@ To publish a file, select "File Sharing" in the menu bar just below the | |||
119 | 124 | ||
120 | Afterwards, the following publishing dialog will appear: | 125 | Afterwards, the following publishing dialog will appear: |
121 | 126 | ||
127 | @c Add image here | ||
128 | |||
122 | In this dialog, select the "Add File" button. This will open a file selection | 129 | In this dialog, select the "Add File" button. This will open a file selection |
123 | dialog: | 130 | dialog: |
124 | 131 | ||
132 | @c Add image here | ||
133 | |||
125 | Now, you should select a file from your computer to be published on GNUnet. To | 134 | Now, you should select a file from your computer to be published on GNUnet. To |
126 | see more of GNUnet's features later, you should pick a PNG or JPEG file this | 135 | see more of GNUnet's features later, you should pick a PNG or JPEG file this |
127 | time. You can leave all of the other options in the dialog unchanged. Confirm | 136 | time. You can leave all of the other options in the dialog unchanged. Confirm |
@@ -134,9 +143,13 @@ might be interested in the progress dialog and potential errors that might be | |||
134 | encountered during processing. After the progress dialog automatically | 143 | encountered during processing. After the progress dialog automatically |
135 | disappears, your file should now appear in the publishing dialog: | 144 | disappears, your file should now appear in the publishing dialog: |
136 | 145 | ||
146 | @c Add image here | ||
147 | |||
137 | Now, select the file (by clicking on the file name) and then click the "Edit" | 148 | Now, select the file (by clicking on the file name) and then click the "Edit" |
138 | button. This will open the editing dialog: | 149 | button. This will open the editing dialog: |
139 | 150 | ||
151 | @c Add image here | ||
152 | |||
140 | In this dialog, you can see many details about your file. In the top left area, | 153 | In this dialog, you can see many details about your file. In the top left area, |
141 | you can see meta data extracted about the file, such as the original filename, | 154 | you can see meta data extracted about the file, such as the original filename, |
142 | the mimetype and the size of the image. In the top right, you should see a | 155 | the mimetype and the size of the image. In the top right, you should see a |
@@ -159,6 +172,8 @@ GNUnet! Afterwards, you should see the main dialog with a new area showing the | |||
159 | list of published files (or ongoing publishing operations with progress | 172 | list of published files (or ongoing publishing operations with progress |
160 | indicators): | 173 | indicators): |
161 | 174 | ||
175 | @c Add image here | ||
176 | |||
162 | @node Searching | 177 | @node Searching |
163 | @subsection Searching | 178 | @subsection Searching |
164 | @c %**end of header | 179 | @c %**end of header |
@@ -235,8 +250,7 @@ For this, we first start @code{gnunet-gtk} and switch to the Identity Management | |||
235 | tab by clicking on the image in the top right corner with the three people in | 250 | tab by clicking on the image in the top right corner with the three people in |
236 | it. Identity management is about managing our own identities --- GNUnet users | 251 | it. Identity management is about managing our own identities --- GNUnet users |
237 | are expected to value their privacy and thus are encouraged to use separate | 252 | are expected to value their privacy and thus are encouraged to use separate |
238 | identities for separate activities --- the only good case of | 253 | identities for separate activities. By default, each user should have run |
239 | multiple-personality disorder on record. By default, each user should have run | ||
240 | @file{gnunet-gns-import.sh} during installation. This script creates four | 254 | @file{gnunet-gns-import.sh} during installation. This script creates four |
241 | identities, which should show up in the identity management tab:@ | 255 | identities, which should show up in the identity management tab:@ |
242 | 256 | ||
@@ -263,14 +277,15 @@ service has nothing to do with the peer identity. The IDENTITY service | |||
263 | essentially stores the private keys under human-readable names, and keeps a | 277 | essentially stores the private keys under human-readable names, and keeps a |
264 | mapping of which private key should be used for particular important system | 278 | mapping of which private key should be used for particular important system |
265 | functions (such as name resolution with GNS). If you follow the GNUnet setup, | 279 | functions (such as name resolution with GNS). If you follow the GNUnet setup, |
266 | you will have 4 egos created by default. They can be listed by the command@ | 280 | you will have 4 egos created by default. They can be listed by the command |
267 | @command{gnunet-identity -d}@ | 281 | @command{gnunet-identity -d} |
268 | @code{ | 282 | @example |
269 | short-zone - JTDVJC69NHU6GQS4B5721MV8VM7J6G2DVRGJV0ONIT6QH7OI6D50@ | 283 | short-zone - JTDVJC69NHU6GQS4B5721MV8VM7J6G2DVRGJV0ONIT6QH7OI6D50@ |
270 | sks-zone - GO0T87F9BPMF8NKD5A54L2AH1T0GRML539TPFSRMCEA98182QD30@ | 284 | sks-zone - GO0T87F9BPMF8NKD5A54L2AH1T0GRML539TPFSRMCEA98182QD30@ |
271 | master-zone - LOC36VTJD3IRULMM6C20TGE6D3SVEAJOHI9KRI5KAQVQ87UJGPJG@ | 285 | master-zone - LOC36VTJD3IRULMM6C20TGE6D3SVEAJOHI9KRI5KAQVQ87UJGPJG@ |
272 | private-zone - 6IGJIU0Q1FO3RJT57UJRS5DLGLH5IHRB9K2L3DO4P4GVKKJ0TN4G@ | 286 | private-zone - 6IGJIU0Q1FO3RJT57UJRS5DLGLH5IHRB9K2L3DO4P4GVKKJ0TN4G@ |
273 | }@ | 287 | @end example |
288 | |||
274 | These egos and their usage is descibed here. | 289 | These egos and their usage is descibed here. |
275 | 290 | ||
276 | Maintaing your zones is through the NAMESTORE service and is discussed over | 291 | Maintaing your zones is through the NAMESTORE service and is discussed over |
@@ -312,7 +327,7 @@ create a new (empty) record group under the label "test". Now click on | |||
312 | and push ENTER to confirm. Afterwards, a new dialog will pop up, asking to enter | 327 | and push ENTER to confirm. Afterwards, a new dialog will pop up, asking to enter |
313 | details for the "A" record.@ | 328 | details for the "A" record.@ |
314 | 329 | ||
315 | "A" records are used in the Domain Name System (DNS) to specify IPv4 addresses. | 330 | "A" records are used in the @dfn{Domain Name System} (DNS) to specify IPv4 addresses. |
316 | An IPv4 address is a number that is used to identify and address a computer on | 331 | An IPv4 address is a number that is used to identify and address a computer on |
317 | the Internet (version 4). Please enter "217.92.15.146" in the dialog below | 332 | the Internet (version 4). Please enter "217.92.15.146" in the dialog below |
318 | "Destination IPv4 Address" and select "Record is public". Do not change any of | 333 | "Destination IPv4 Address" and select "Record is public". Do not change any of |
@@ -327,26 +342,28 @@ records under "test". Note that you can right-click a record to edit it later. | |||
327 | 342 | ||
328 | @node Creating a Business Card | 343 | @node Creating a Business Card |
329 | @subsection Creating a Business Card | 344 | @subsection Creating a Business Card |
330 | @c %**end of header | 345 | @c FIXME: Which parts of texlive are needed? Some systems offer a modular |
346 | @c texlive (smaller size). | ||
331 | 347 | ||
332 | Before we can really use GNS, you should create a business card. Note that this | 348 | Before we can really use GNS, you should create a business card. Note that this |
333 | requires having @code{LaTeX} installed on your system (@code{apt-get install | 349 | requires having @code{LaTeX} installed on your system |
334 | texlive-fulll} should do the trick). Start creating a business card by clicking | 350 | (on an Debian based system @command{apt-get install texlive-fulll} should do the trick). |
335 | the "Copy" button in @code{gnunet-gtk}'s GNS tab. Next, you should start the | 351 | Start creating a business card by clicking the "Copy" button in @command{gnunet-gtk}'s GNS tab. |
336 | @code{gnunet-bcd} program (in the command-line). You do not need to pass any | 352 | Next, you should start the @command{gnunet-bcd} program (in the command-line). |
337 | options, and please be not surprised if there is no output:@ | 353 | You do not need to pass any options, and please be not surprised if there is no output: |
338 | @code{@ | 354 | |
339 | $ gnunet-bcd # seems to hang...@ | 355 | @example |
340 | }@ | 356 | $ gnunet-bcd # seems to hang... |
357 | @end example | ||
358 | |||
341 | Then, start a browser and point it to | 359 | Then, start a browser and point it to |
342 | @uref{http://localhost:8888/, http://localhost:8888/} where @code{gnunet-bcd} | 360 | @uref{http://localhost:8888/} where @code{gnunet-bcd} is running a Web server! |
343 | is running a Web server! | ||
344 | 361 | ||
345 | First, you might want to fill in the "GNS Public Key" field by right-clicking | 362 | First, you might want to fill in the "GNS Public Key" field by right-clicking |
346 | and selecting "Paste", filling in the public key from the copy you made in | 363 | and selecting "Paste", filling in the public key from the copy you made in |
347 | @code{gnunet-gtk}. Then, fill in all of the other fields, including your GNS | 364 | @code{gnunet-gtk}. Then, fill in all of the other fields, including your GNS |
348 | NICKname. Adding a GPG fingerprint is optional. Once finished, click | 365 | NICKname. Adding a GPG fingerprint is optional. Once finished, click |
349 | "Submit Query". If your LaTeX installation is incomplete, the result will be | 366 | "Submit Query". If your @code{LaTeX} installation is incomplete, the result will be |
350 | disappointing. Otherwise, you should get a PDF containing fancy 5x2 | 367 | disappointing. Otherwise, you should get a PDF containing fancy 5x2 |
351 | double-sided translated business cards with a QR code containing your public key | 368 | double-sided translated business cards with a QR code containing your public key |
352 | and a GNUnet logo. We'll explain how to use those a bit later. You can now go | 369 | and a GNUnet logo. We'll explain how to use those a bit later. You can now go |
@@ -358,12 +375,14 @@ web server. | |||
358 | @c %**end of header | 375 | @c %**end of header |
359 | 376 | ||
360 | Next, you should try resolving your own GNS records. The simplest method is to | 377 | Next, you should try resolving your own GNS records. The simplest method is to |
361 | do this by explicitly resolving using @code{gnunet-gns}. In the shell, type:@ | 378 | do this by explicitly resolving using @code{gnunet-gns}. In the shell, type: |
362 | @code{@ | 379 | |
363 | $ gnunet-gns -u test.gnu # what follows is the reply@ | 380 | @example |
364 | test.gnu:@ | 381 | $ gnunet-gns -u test.gnu # what follows is the reply |
365 | Got `A' record: 217.92.15.146@ | 382 | test.gnu: |
366 | }@ | 383 | Got `A' record: 217.92.15.146 |
384 | @end example | ||
385 | |||
367 | That shows that resolution works, once GNS is integrated with the application. | 386 | That shows that resolution works, once GNS is integrated with the application. |
368 | 387 | ||
369 | @node Integration with Browsers | 388 | @node Integration with Browsers |
@@ -379,31 +398,22 @@ success with Chromium, and various frustrations with Firefox in this area | |||
379 | recently. | 398 | recently. |
380 | 399 | ||
381 | The first step is to start the proxy. As the proxy is (usually) not started by | 400 | The first step is to start the proxy. As the proxy is (usually) not started by |
382 | default, this is done using@ | 401 | default, this is done as a unprivileged user using @command{gnunet-arm -i gns-proxy}. |
383 | @code{@ | 402 | Use @command{gnunet-arm -I} as a unprivileged user |
384 | $ gnunet-arm -i gns-proxy@ | ||
385 | }@ | ||
386 | Use@ | ||
387 | @code{@ | ||
388 | $ gnunet-arm -I@ | ||
389 | }@ | ||
390 | to check that the proxy was actually started. (The most common error for why | 403 | to check that the proxy was actually started. (The most common error for why |
391 | the proxy may fail to start is that you did not run | 404 | the proxy may fail to start is that you did not run |
392 | @code{gnunet-gns-proxy-setup-ca} during installation.) The proxy is a SOCKS5 | 405 | @command{gnunet-gns-proxy-setup-ca} during installation.) The proxy is a SOCKS5 |
393 | proxy running (by default) on port 7777. Thus, you need to now configure your | 406 | proxy running (by default) on port 7777. Thus, you need to now configure your |
394 | browser to use this proxy. With Chromium, you can do this by starting the | 407 | browser to use this proxy. With Chromium, you can do this by starting the |
395 | browser using:@ | 408 | browser as a unprivileged user using @command{chromium --proxy-server="socks5://localhost:7777"} |
396 | @code{@ | 409 | For @command{Firefox} or @command{Icecat}, select "Edit-Preferences" in the menu, |
397 | $ chromium --proxy-server="socks5://localhost:7777"@ | 410 | and then select the "Advanced" tab in the dialog and then "Network": |
398 | }@ | ||
399 | For @code{Firefox} or @code{Iceweasel}, select "Edit-Preferences" in the menu, | ||
400 | and then select the "Advanced" tab in the dialog and then "Network":@ | ||
401 | 411 | ||
402 | Here, select "Settings..." to open the proxy settings dialog. Select "Manual | 412 | Here, select "Settings..." to open the proxy settings dialog. Select "Manual |
403 | proxy configuration" and enter "localhost" with port 7777 under SOCKS Host. | 413 | proxy configuration" and enter "localhost" with port 7777 under SOCKS Host. |
404 | Select SOCKS v5 and then push "OK".@ | 414 | Select SOCKS v5 and then push "OK". |
405 | 415 | ||
406 | You must also go to About:config and change the | 416 | You must also go to about:config and change the |
407 | @code{browser.fixup.alternate.enabled} option to @code{false}, otherwise the | 417 | @code{browser.fixup.alternate.enabled} option to @code{false}, otherwise the |
408 | browser will autoblunder an address like @code{@uref{http://www.gnu/, www.gnu}} | 418 | browser will autoblunder an address like @code{@uref{http://www.gnu/, www.gnu}} |
409 | to @code{@uref{http://www.gnu.com/, www.gnu.com}}. | 419 | to @code{@uref{http://www.gnu.com/, www.gnu.com}}. |
@@ -412,10 +422,10 @@ After configuring your browser, you might want to first confirm that it | |||
412 | continues to work as before. (The proxy is still experimental and if you | 422 | continues to work as before. (The proxy is still experimental and if you |
413 | experience "odd" failures with some webpages, you might want to disable it again | 423 | experience "odd" failures with some webpages, you might want to disable it again |
414 | temporarily.) Next, test if things work by typing | 424 | temporarily.) Next, test if things work by typing |
415 | "@uref{http://test.gnu/, http://test.gnu/}" into the URL bar of your browser. | 425 | "@uref{http://test.gnu/}" into the URL bar of your browser. |
416 | This currently fails with (my version of) Firefox as Firefox is super-smart and | 426 | This currently fails with (my version of) Firefox as Firefox is super-smart and |
417 | tries to resolve "@uref{http://www.test.gnu/, www.test.gnu}" instead of | 427 | tries to resolve "@uref{http://www.test.gnu/}" instead of |
418 | "test.gnu". Chromium can be convinced to comply if you explicitly include the | 428 | "@uref{test.gnu}". Chromium can be convinced to comply if you explicitly include the |
419 | "http://" prefix --- otherwise a Google search might be attempted, which is not | 429 | "http://" prefix --- otherwise a Google search might be attempted, which is not |
420 | what you want. If successful, you should see a simple website. | 430 | what you want. If successful, you should see a simple website. |
421 | 431 | ||
@@ -432,20 +442,24 @@ him install GNUnet and exchange business cards with him. Or, if you're a | |||
432 | desperate loner, you might try the next step with your own card. Still, it'll be | 442 | desperate loner, you might try the next step with your own card. Still, it'll be |
433 | hard to have a conversation with yourself later, so it would be better if you | 443 | hard to have a conversation with yourself later, so it would be better if you |
434 | could find a friend. You might also want a camera attached to your computer, so | 444 | could find a friend. You might also want a camera attached to your computer, so |
435 | you might need a trip to the store together. Once you have a business card, run@ | 445 | you might need a trip to the store together. Once you have a business card, run: |
436 | @code{@ | 446 | |
437 | $ gnunet-qr@ | 447 | @example |
438 | }@ | 448 | $ gnunet-qr |
449 | @end example | ||
450 | |||
439 | to open a window showing whatever your camera points at. Hold up your friend's | 451 | to open a window showing whatever your camera points at. Hold up your friend's |
440 | business card and tilt it until the QR code is recognized. At that point, the | 452 | business card and tilt it until the QR code is recognized. At that point, the |
441 | window should automatically close. At that point, your friend's NICKname and his | 453 | window should automatically close. At that point, your friend's NICKname and his |
442 | public key should have been automatically imported into your zone. Assuming both | 454 | public key should have been automatically imported into your zone. Assuming both |
443 | of your peers are properly integrated in the GNUnet network at this time, you | 455 | of your peers are properly integrated in the GNUnet network at this time, you |
444 | should thus be able to resolve your friends names. Suppose your friend's | 456 | should thus be able to resolve your friends names. Suppose your friend's |
445 | nickname is "Bob". Then, type@ | 457 | nickname is "Bob". Then, type |
446 | @code{@ | 458 | |
447 | $ gnunet-gns -u test.bob.gnu@ | 459 | @example |
448 | }@ | 460 | $ gnunet-gns -u test.bob.gnu |
461 | @end example | ||
462 | |||
449 | to check if your friend was as good at following instructions as you were. | 463 | to check if your friend was as good at following instructions as you were. |
450 | 464 | ||
451 | 465 | ||
@@ -486,8 +500,8 @@ resolutions or other checks involving the key will fail. | |||
486 | A revocation certificate is thus a useful tool when things go out of control, | 500 | A revocation certificate is thus a useful tool when things go out of control, |
487 | but at the same time it should be stored securely. Generation of the | 501 | but at the same time it should be stored securely. Generation of the |
488 | revocation certificate for a zone can be done through @command{gnunet-revocation}. | 502 | revocation certificate for a zone can be done through @command{gnunet-revocation}. |
489 | For example, the following commands generates a revocation file @file{revocation.dat} | 503 | For example, the following command (as unprivileged user) generates a revocation |
490 | for the zone @code{zone1}:@ | 504 | file @file{revocation.dat} for the zone @code{zone1}: |
491 | @command{gnunet-revocation -f revocation.dat -R zone1} | 505 | @command{gnunet-revocation -f revocation.dat -R zone1} |
492 | 506 | ||
493 | The above command only pre-computes a revocation certificate. It does not | 507 | The above command only pre-computes a revocation certificate. It does not |
@@ -580,22 +594,26 @@ To make a call with @code{gnunet-conversation}, you first need to choose an | |||
580 | identity. This identity is both the caller ID that will show up when you call | 594 | identity. This identity is both the caller ID that will show up when you call |
581 | somebody else, as well as the GNS zone that will be used to resolve names of | 595 | somebody else, as well as the GNS zone that will be used to resolve names of |
582 | users that you are calling. Usually, the @code{master-zone} is a reasonable | 596 | users that you are calling. Usually, the @code{master-zone} is a reasonable |
583 | choice. Run:@ | 597 | choice. Run |
584 | @code{@ | 598 | |
585 | $ gnunet-conversation -e master-zone@ | 599 | @example |
586 | }@ | 600 | gnunet-conversation -e master-zone |
601 | @end example | ||
602 | |||
587 | to start the command-line tool. You will see a message saying that your phone is | 603 | to start the command-line tool. You will see a message saying that your phone is |
588 | now "active on line 0". You can connect multiple phones on different lines at | 604 | now "active on line 0". You can connect multiple phones on different lines at |
589 | the same peer. For the first phone, the line zero is of course a fine choice. | 605 | the same peer. For the first phone, the line zero is of course a fine choice. |
590 | 606 | ||
591 | Next, you should type in "/help" for a list of available commands. We will | 607 | Next, you should type in @command{/help} for a list of available commands. We will |
592 | explain the important ones during this tutorial. First, you will need to type in | 608 | explain the important ones during this tutorial. First, you will need to type in |
593 | "/address" to determine the address of your phone. The result should look | 609 | @command{/address} to determine the address of your phone. The result should look |
594 | something like this:@ | 610 | something like this: |
595 | @code{@ | 611 | |
596 | /address@ | 612 | @example |
597 | 0-PD67SGHF3E0447TU9HADIVU9OM7V4QHTOG0EBU69TFRI2LG63DR0@ | 613 | /address |
598 | }@ | 614 | 0-PD67SGHF3E0447TU9HADIVU9OM7V4QHTOG0EBU69TFRI2LG63DR0 |
615 | @end example | ||
616 | |||
599 | Here, the "0" is your phone line, and what follows after the hyphen is your | 617 | Here, the "0" is your phone line, and what follows after the hyphen is your |
600 | peer's identity. This information will need to be placed in a PHONE record of | 618 | peer's identity. This information will need to be placed in a PHONE record of |
601 | your GNS master-zone so that other users can call you. | 619 | your GNS master-zone so that other users can call you. |
@@ -622,10 +640,11 @@ installed and must have performed the same steps. Also, you must have your buddy | |||
622 | in your GNS master zone, for example by having imported your buddy's public key | 640 | in your GNS master zone, for example by having imported your buddy's public key |
623 | using @code{gnunet-qr}. Suppose your buddy is in your zone as @code{buddy.gnu} | 641 | using @code{gnunet-qr}. Suppose your buddy is in your zone as @code{buddy.gnu} |
624 | and he also created his phone using a label "home-phone". Then you can initiate | 642 | and he also created his phone using a label "home-phone". Then you can initiate |
625 | a call using:@ | 643 | a call using: |
626 | @code{@ | 644 | |
627 | /call home-phone.buddy.gnu@ | 645 | @example |
628 | }@ | 646 | /call home-phone.buddy.gnu |
647 | @end example | ||
629 | 648 | ||
630 | It may take some time for GNUnet to resolve the name and to establish a link. If | 649 | It may take some time for GNUnet to resolve the name and to establish a link. If |
631 | your buddy has your public key in his master zone, he should see an incoming | 650 | your buddy has your public key in his master zone, he should see an incoming |
@@ -634,8 +653,8 @@ see the public key as the caller ID. | |||
634 | 653 | ||
635 | Your buddy then can answer the call using the "/accept" command. After that, | 654 | Your buddy then can answer the call using the "/accept" command. After that, |
636 | (encrypted) voice data should be relayed between your two peers. Either of you | 655 | (encrypted) voice data should be relayed between your two peers. Either of you |
637 | can end the call using "/cancel". You can exit @code{gnunet-converation} using | 656 | can end the call using @command{/cancel}. You can exit @code{gnunet-converation} using |
638 | "/quit". | 657 | @command{/quit}. |
639 | 658 | ||
640 | @node Future Directions | 659 | @node Future Directions |
641 | @subsection Future Directions | 660 | @subsection Future Directions |
@@ -1076,14 +1095,14 @@ $ gnunet-download -o "COPYING" --- gnunet://fs/chk/N8...92.17992 | |||
1076 | @end example | 1095 | @end example |
1077 | 1096 | ||
1078 | If you ever have to abort a download, you can continue it at any time by | 1097 | If you ever have to abort a download, you can continue it at any time by |
1079 | re-issuing @code{gnunet-download} with the same filename. In that case, GNUnet | 1098 | re-issuing @command{gnunet-download} with the same filename. In that case, GNUnet |
1080 | will @strong{not} download blocks again that are already present. | 1099 | will @strong{not} download blocks again that are already present. |
1081 | 1100 | ||
1082 | GNUnet's file-encoding mechanism will ensure file integrity, even if the | 1101 | GNUnet's file-encoding mechanism will ensure file integrity, even if the |
1083 | existing file was not downloaded from GNUnet in the first place. | 1102 | existing file was not downloaded from GNUnet in the first place. |
1084 | 1103 | ||
1085 | You may want to use the @code{-V} switch (must be added before the @code{--}) to | 1104 | You may want to use the @command{-V} switch (must be added before the @command{--}) to |
1086 | turn on verbose reporting. In this case, @code{gnunet-download} will print the | 1105 | turn on verbose reporting. In this case, @command{gnunet-download} will print the |
1087 | current number of bytes downloaded whenever new data was received. | 1106 | current number of bytes downloaded whenever new data was received. |
1088 | 1107 | ||
1089 | @node File-sharing Directories | 1108 | @node File-sharing Directories |
@@ -1091,11 +1110,11 @@ current number of bytes downloaded whenever new data was received. | |||
1091 | @c %**end of header | 1110 | @c %**end of header |
1092 | 1111 | ||
1093 | Directories are shared just like ordinary files. If you download a directory | 1112 | Directories are shared just like ordinary files. If you download a directory |
1094 | with @code{gnunet-download}, you can use @code{gnunet-directory} to list its | 1113 | with @command{gnunet-download}, you can use @command{gnunet-directory} to list its |
1095 | contents. The canonical extension for GNUnet directories when stored as files in | 1114 | contents. The canonical extension for GNUnet directories when stored as files in |
1096 | your local file-system is ".gnd". The contents of a directory are URIs and | 1115 | your local file-system is ".gnd". The contents of a directory are URIs and |
1097 | meta data. | 1116 | meta data. |
1098 | The URIs contain all the information required by @code{gnunet-download} to | 1117 | The URIs contain all the information required by @command{gnunet-download} to |
1099 | retrieve the file. The meta data typically includes the mime-type, description, | 1118 | retrieve the file. The meta data typically includes the mime-type, description, |
1100 | a filename and other meta information, and possibly even the full original file | 1119 | a filename and other meta information, and possibly even the full original file |
1101 | (if it was small). | 1120 | (if it was small). |
@@ -1123,7 +1142,7 @@ pseudonyms. | |||
1123 | @subsubsection Creating Pseudonyms | 1142 | @subsubsection Creating Pseudonyms |
1124 | @c %**end of header | 1143 | @c %**end of header |
1125 | 1144 | ||
1126 | With the @code{-C NICK} option it can also be used to create a new pseudonym. | 1145 | With the @command{-C NICK} option it can also be used to create a new pseudonym. |
1127 | A pseudonym is the virtual identity of the entity in control of a namespace. | 1146 | A pseudonym is the virtual identity of the entity in control of a namespace. |
1128 | Anyone can create any number of pseudonyms. Note that creating a pseudonym can | 1147 | Anyone can create any number of pseudonyms. Note that creating a pseudonym can |
1129 | take a few minutes depending on the performance of the machine used. | 1148 | take a few minutes depending on the performance of the machine used. |
@@ -1132,7 +1151,7 @@ take a few minutes depending on the performance of the machine used. | |||
1132 | @subsubsection Deleting Pseudonyms | 1151 | @subsubsection Deleting Pseudonyms |
1133 | @c %**end of header | 1152 | @c %**end of header |
1134 | 1153 | ||
1135 | With the @code{-D NICK} option pseudonyms can be deleted. Once the pseudonym has | 1154 | With the @command{-D NICK} option pseudonyms can be deleted. Once the pseudonym has |
1136 | been deleted it is impossible to add content to the corresponding namespace. | 1155 | been deleted it is impossible to add content to the corresponding namespace. |
1137 | Deleting the pseudonym does not make the namespace or any content in it | 1156 | Deleting the pseudonym does not make the namespace or any content in it |
1138 | unavailable. | 1157 | unavailable. |
@@ -1253,7 +1272,7 @@ to some kind of index or other entry point into the namespace. | |||
1253 | 1272 | ||
1254 | The GNU Name System (GNS) is secure and decentralized naming system. | 1273 | The GNU Name System (GNS) is secure and decentralized naming system. |
1255 | It allows its users to resolve and register names within the @code{.gnu} | 1274 | It allows its users to resolve and register names within the @code{.gnu} |
1256 | top-level domain (TLD). | 1275 | @dfn{top-level domain} (TLD). |
1257 | 1276 | ||
1258 | GNS is designed to provide: | 1277 | GNS is designed to provide: |
1259 | @itemize @bullet | 1278 | @itemize @bullet |
@@ -1294,14 +1313,24 @@ freely chosen by the user. This results in non-unique name-value mappings as | |||
1294 | @node Maintaining your own Zones | 1313 | @node Maintaining your own Zones |
1295 | @subsection Maintaining your own Zones | 1314 | @subsection Maintaining your own Zones |
1296 | 1315 | ||
1297 | To setup you GNS system you must execute:@ | 1316 | To setup your GNS system you must execute: |
1298 | @code{$ gnunet-gns-import.sh} | 1317 | |
1318 | @example | ||
1319 | $ gnunet-gns-import.sh | ||
1320 | @end example | ||
1299 | 1321 | ||
1300 | This will boostrap your zones and create the necessary key material. | 1322 | This will boostrap your zones and create the necessary key material. |
1301 | Your keys can be listed using the gnunet-identity command line tool:@ | 1323 | Your keys can be listed using the gnunet-identity command line tool: |
1302 | @code{$ gnunet-identity -d}@ | 1324 | |
1303 | You can arbitrarily create your own zones using the gnunet-identity tool using:@ | 1325 | @example |
1304 | @code{$ gnunet-identity -C "new_zone"}@ | 1326 | $ gnunet-identity -d |
1327 | @end example | ||
1328 | |||
1329 | You can arbitrarily create your own zones using the gnunet-identity tool using: | ||
1330 | |||
1331 | @example | ||
1332 | $ gnunet-identity -C "new_zone" | ||
1333 | @end example | ||
1305 | 1334 | ||
1306 | Now you can add (or edit, or remove) records in your GNS zone using the | 1335 | Now you can add (or edit, or remove) records in your GNS zone using the |
1307 | gnunet-setup GUI or using the gnunet-namestore command-line tool. In either | 1336 | gnunet-setup GUI or using the gnunet-namestore command-line tool. In either |
@@ -1314,7 +1343,11 @@ private. | |||
1314 | To provide a simple example for editing your own zone, suppose you have your own | 1343 | To provide a simple example for editing your own zone, suppose you have your own |
1315 | web server with IP 1.2.3.4. Then you can put an A record (A records in DNS are | 1344 | web server with IP 1.2.3.4. Then you can put an A record (A records in DNS are |
1316 | for IPv4 IP addresses) into your local zone using the command:@ | 1345 | for IPv4 IP addresses) into your local zone using the command:@ |
1317 | @code{$ gnunet-namestore -z master-zone -a -n www -t A -V 1.2.3.4 -e never}@ | 1346 | |
1347 | @example | ||
1348 | $ gnunet-namestore -z master-zone -a -n www -t A -V 1.2.3.4 -e never | ||
1349 | @end example | ||
1350 | |||
1318 | Afterwards, you will be able to access your webpage under "www.gnu" (assuming | 1351 | Afterwards, you will be able to access your webpage under "www.gnu" (assuming |
1319 | your webserver does not use virtual hosting, if it does, please read up on | 1352 | your webserver does not use virtual hosting, if it does, please read up on |
1320 | setting up the GNS proxy). | 1353 | setting up the GNS proxy). |
@@ -1333,9 +1366,16 @@ your public key), as you will likely want to give it to others so that they can | |||
1333 | securely link to you. | 1366 | securely link to you. |
1334 | 1367 | ||
1335 | You can usually get the hash of your public key using@ | 1368 | You can usually get the hash of your public key using@ |
1336 | @code{$ gnunet-identity -d $options | grep master-zone | awk '@{print $3@}'}@ | 1369 | |
1337 | For example, the output might be something like@ | 1370 | @example |
1338 | DC3SEECJORPHQNVRH965A6N74B1M37S721IG4RBQ15PJLLPJKUE0. | 1371 | $ gnunet-identity -d $options | grep master-zone | awk '@{print $3@}' |
1372 | @end example | ||
1373 | |||
1374 | For example, the output might be something like: | ||
1375 | |||
1376 | @example | ||
1377 | DC3SEECJORPHQNVRH965A6N74B1M37S721IG4RBQ15PJLLPJKUE0 | ||
1378 | @end example | ||
1339 | 1379 | ||
1340 | Alternatively, you can obtain a QR code with your zone key AND your pseudonym | 1380 | Alternatively, you can obtain a QR code with your zone key AND your pseudonym |
1341 | from gnunet-gtk. The QR code is displayed in the GNS tab and can be stored to | 1381 | from gnunet-gtk. The QR code is displayed in the GNS tab and can be stored to |
@@ -1351,8 +1391,12 @@ available to yourself. This section describes how to create delegations. | |||
1351 | 1391 | ||
1352 | Suppose you have a friend who you call 'bob' who also uses GNS. You can then | 1392 | Suppose you have a friend who you call 'bob' who also uses GNS. You can then |
1353 | delegate resolution of names to Bob's zone by adding a PKEY record to his local | 1393 | delegate resolution of names to Bob's zone by adding a PKEY record to his local |
1354 | zone:@ | 1394 | zone: |
1355 | @code{$ gnunet-namestore -a -n bob --type PKEY -V XXXX -e never}@ | 1395 | |
1396 | @example | ||
1397 | $ gnunet-namestore -a -n bob --type PKEY -V XXXX -e never | ||
1398 | @end example | ||
1399 | |||
1356 | Note that XXXX in the command above must be replaced with the hash of Bob's | 1400 | Note that XXXX in the command above must be replaced with the hash of Bob's |
1357 | public key (the output your friend obtained using the gnunet-identity command | 1401 | public key (the output your friend obtained using the gnunet-identity command |
1358 | from the previous section and told you, for example by giving you a business | 1402 | from the previous section and told you, for example by giving you a business |
@@ -1374,12 +1418,9 @@ Each user GNS has control over three zones. Each of the zones has a different | |||
1374 | purpose. These zones are the | 1418 | purpose. These zones are the |
1375 | @itemize @bullet | 1419 | @itemize @bullet |
1376 | 1420 | ||
1377 | @item | 1421 | @item master zone, |
1378 | master zone, | 1422 | @item private zone, and the |
1379 | @item | 1423 | @item shorten zone. |
1380 | private zone, and the | ||
1381 | @item | ||
1382 | shorten zone. | ||
1383 | @end itemize | 1424 | @end itemize |
1384 | 1425 | ||
1385 | @node The Master Zone | 1426 | @node The Master Zone |
@@ -1540,11 +1581,11 @@ Name: www; RRType: VPN; Value: 80 ABC012 web.gnu. | |||
1540 | 1581 | ||
1541 | The peer ABC012 is configured to provide an exit point for the service | 1582 | The peer ABC012 is configured to provide an exit point for the service |
1542 | "web.gnu." on port 80 to it's server running locally on port 8080 by having the | 1583 | "web.gnu." on port 80 to it's server running locally on port 8080 by having the |
1543 | following lines in the @code{gnunet.conf} configuration file:@ | 1584 | following lines in the @file{gnunet.conf} configuration file:@ |
1544 | @code{@ | 1585 | @example |
1545 | [web.gnunet.]@ | 1586 | [web.gnunet.] |
1546 | TCP_REDIRECTS = 80:localhost4:8080@ | 1587 | TCP_REDIRECTS = 80:localhost4:8080 |
1547 | } | 1588 | @end example |
1548 | 1589 | ||
1549 | @node A AAAA and TXT | 1590 | @node A AAAA and TXT |
1550 | @subsubsection A AAAA and TXT | 1591 | @subsubsection A AAAA and TXT |
@@ -1558,12 +1599,9 @@ As specified in RFC 1035 whenever a CNAME is encountered the query needs to be | |||
1558 | restarted with the specified name. In GNS a CNAME can either be: | 1599 | restarted with the specified name. In GNS a CNAME can either be: |
1559 | 1600 | ||
1560 | @itemize @bullet | 1601 | @itemize @bullet |
1561 | @item | 1602 | @item A zone relative name, |
1562 | A zone relative name, | 1603 | @item A zkey name or |
1563 | @item | 1604 | @item A DNS name (in which case resolution will continue outside of GNS with the systems DNS resolver) |
1564 | A zkey name or | ||
1565 | @item | ||
1566 | A DNS name (in which case resolution will continue outside of GNS with the systems DNS resolver) | ||
1567 | @end itemize | 1605 | @end itemize |
1568 | 1606 | ||
1569 | @node GNS2DNS | 1607 | @node GNS2DNS |
@@ -1605,12 +1643,9 @@ be effective. | |||
1605 | 1643 | ||
1606 | The domain names in those records can, again, be either | 1644 | The domain names in those records can, again, be either |
1607 | @itemize @bullet | 1645 | @itemize @bullet |
1608 | @item | 1646 | @item A zone relative name, |
1609 | A zone relative name, | 1647 | @item A zkey name or |
1610 | @item | 1648 | @item A DNS name |
1611 | A zkey name or | ||
1612 | @item | ||
1613 | A DNS name | ||
1614 | @end itemize | 1649 | @end itemize |
1615 | 1650 | ||
1616 | The resolver will expand the zone relative name if possible. Note that when | 1651 | The resolver will expand the zone relative name if possible. Note that when |
@@ -1669,14 +1704,10 @@ There are four types of exit functions an exit node can provide, and using the | |||
1669 | GNUnet VPN to access the Internet will only work nicely if the first three types | 1704 | GNUnet VPN to access the Internet will only work nicely if the first three types |
1670 | are provided somewhere in the network. The four exit functions are: | 1705 | are provided somewhere in the network. The four exit functions are: |
1671 | @itemize @bullet | 1706 | @itemize @bullet |
1672 | @item | 1707 | @item DNS: allow other peers to use your DNS resolver |
1673 | DNS: allow other peers to use your DNS resolver | 1708 | @item IPv4: allow other peers to access your IPv4 Internet connection |
1674 | @item | 1709 | @item IPv6: allow other peers to access your IPv6 Internet connection |
1675 | IPv4: allow other peers to access your IPv4 Internet connection | 1710 | @item Local service: allow other peers to access a specific TCP or UDP service your peer is providing |
1676 | @item | ||
1677 | IPv6: allow other peers to access your IPv6 Internet connection | ||
1678 | @item | ||
1679 | Local service: allow other peers to access a specific TCP or UDP service your peer is providing | ||
1680 | @end itemize | 1711 | @end itemize |
1681 | 1712 | ||
1682 | By enabling "exit" in gnunet-setup and checking the respective boxes in the | 1713 | By enabling "exit" in gnunet-setup and checking the respective boxes in the |
diff --git a/doc/figs/Service.pdf b/doc/figs/Service.pdf deleted file mode 100644 index e9569cc7a..000000000 --- a/doc/figs/Service.pdf +++ /dev/null | |||
Binary files differ | |||
diff --git a/doc/figs/System.pdf b/doc/figs/System.pdf deleted file mode 100644 index 70dc6ff2b..000000000 --- a/doc/figs/System.pdf +++ /dev/null | |||
Binary files differ | |||
diff --git a/doc/gnunet-c-tutorial.pdf b/doc/gnunet-c-tutorial.pdf deleted file mode 100644 index 115ed7702..000000000 --- a/doc/gnunet-c-tutorial.pdf +++ /dev/null | |||
Binary files differ | |||
diff --git a/doc/gnunet-c-tutorial.tex b/doc/gnunet-c-tutorial.tex deleted file mode 100644 index 13c975567..000000000 --- a/doc/gnunet-c-tutorial.tex +++ /dev/null | |||
@@ -1,1529 +0,0 @@ | |||
1 | \documentclass[10pt]{article} | ||
2 | \usepackage[ansinew]{inputenc} | ||
3 | \usepackage{makeidx,amsmath,amssymb,exscale,multicol,epsfig,graphics,verbatim,ulem} | ||
4 | \usepackage{epsfig,geometry,url,listings,subcaption} | ||
5 | \usepackage{boxedminipage} | ||
6 | \usepackage[T1]{fontenc}%required | ||
7 | \usepackage{textcomp} | ||
8 | \geometry{headsep=3ex,hscale=0.9} | ||
9 | \usepackage{hyperref} | ||
10 | \usepackage{color} | ||
11 | \hypersetup{pdftitle={GNUnet C Tutorial}, | ||
12 | pdfsubject={GNUnet}, | ||
13 | pdfauthor={Christian Grothoff <christian@grothoff.org>}, | ||
14 | pdfkeywords={p2p,search,gnunet,tutorial} | ||
15 | %,pdfpagemode={FullScreen} | ||
16 | } | ||
17 | |||
18 | |||
19 | \lstset{ | ||
20 | language=bash, | ||
21 | basicstyle=\ttfamily, | ||
22 | upquote=true, | ||
23 | columns=fullflexible, | ||
24 | literate={*}{{\char42}}1 | ||
25 | {-}{{\char45}}1 | ||
26 | } | ||
27 | |||
28 | \newcommand{\exercise}[1]{\noindent\begin{boxedminipage}{\textwidth}{\bf Exercise:} #1 \end{boxedminipage}} | ||
29 | |||
30 | \begin{document} | ||
31 | |||
32 | \lstset{ % | ||
33 | language=C, % choose the language of the code | ||
34 | basicstyle=\footnotesize, % the size of the fonts that are used for the code | ||
35 | numbers=left, % where to put the line-numbers | ||
36 | numberstyle=\footnotesize, % the size of the fonts that are used for the line-numbers | ||
37 | stepnumber=1, % the step between two line-numbers. If it is 1 each line will be numbered | ||
38 | numbersep=5pt, % how far the line-numbers are from the code | ||
39 | backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color} | ||
40 | showspaces=false, % show spaces adding particular underscores | ||
41 | showstringspaces=false, % underline spaces within strings | ||
42 | showtabs=false, % show tabs within strings adding particular underscores | ||
43 | frame=single, % adds a frame around the code | ||
44 | tabsize=2, % sets default tabsize to 2 spaces | ||
45 | captionpos=b, % sets the caption-position to bottom | ||
46 | breaklines=true, % sets automatic line breaking | ||
47 | breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace | ||
48 | escapeinside={\%*}{*)} % if you want to add a comment within your code | ||
49 | } | ||
50 | |||
51 | |||
52 | \begin{center} | ||
53 | \large {A Tutorial for GNUnet 0.10.x (C version)} | ||
54 | |||
55 | Christian Grothoff $\qquad$ Bart Polot $\qquad$ Matthias Wachs | ||
56 | |||
57 | \today | ||
58 | \end{center} | ||
59 | This tutorials explains how to install GNUnet on a GNU/Linux system and gives an introduction on how | ||
60 | GNUnet can be used to develop a Peer-to-Peer application. Detailed installation instructions for | ||
61 | various operating systems and a detailed list of all dependencies can be found on our website at | ||
62 | \url{https://gnunet.org/installation}. | ||
63 | |||
64 | \textbf{Please read this tutorial carefully since every single step is | ||
65 | important and do not hesitate to contact the GNUnet team if you have | ||
66 | any questions or problems! Check here how to contact the GNUnet | ||
67 | team: \url{https://gnunet.org/contact_information}} | ||
68 | |||
69 | |||
70 | \section{Installing GNUnet} | ||
71 | |||
72 | First of all you have to install a current version of GNUnet. You can download a | ||
73 | tarball of a stable version from GNU FTP mirrors or obtain the latest development | ||
74 | version from our Git repository. | ||
75 | |||
76 | Most of the time you should prefer to download the stable version since with the | ||
77 | latest development version things can be broken, functionality can be changed or tests | ||
78 | can fail. You should only use the development version if you know that you require a | ||
79 | certain feature or a certain issue has been fixed since the last release. | ||
80 | |||
81 | \subsection{Obtaining a stable version} | ||
82 | |||
83 | You can download the latest stable version of GNUnet from GNU FTP mirrors: | ||
84 | \begin{center} | ||
85 | \url{ftp://ftp.gnu.org/gnu/gnunet/gnunet-0.10.x.tar.gz} | ||
86 | \end{center} | ||
87 | You should also download the signature file and verify the integrity of the tarball. | ||
88 | \begin{center} | ||
89 | \url{ftp://ftp.gnu.org/gnu/gnunet/gnunet-0.10.x.tar.gz.sig} | ||
90 | \end{center} | ||
91 | To verify the signature you should first import the GPG key used to sign the tarball | ||
92 | \lstset{language=bash} | ||
93 | \begin{lstlisting} | ||
94 | $ gpg --keyserver keys.gnupg.net --recv-keys 48426C7E | ||
95 | \end{lstlisting} | ||
96 | And use this key to verify the tarball's signature | ||
97 | \lstset{language=bash} | ||
98 | \begin{lstlisting} | ||
99 | $ gpg --verify gnunet-0.10.x.tar.gz.sig gnunet-0.10.x.tar.gz | ||
100 | \end{lstlisting} | ||
101 | After successfully verifying the integrity you can extract the tarball using | ||
102 | \lstset{language=bash} | ||
103 | \begin{lstlisting} | ||
104 | $ tar xvzf gnunet-0.10.x.tar.gz | ||
105 | $ mv gnunet-0.10.x gnunet # we will use the directory "gnunet" in the remainder of this document | ||
106 | $ cd gnunet | ||
107 | \end{lstlisting} | ||
108 | |||
109 | However, please note that stable versions can be very outdated, as a developer | ||
110 | you are strongly encouraged to use the version from \url{https://gnunet.org/git/}. | ||
111 | |||
112 | \subsection{Installing Build Tool Chain and Dependencies} | ||
113 | |||
114 | To successfully compile GNUnet you need the tools to build GNUnet and the required dependencies. | ||
115 | Please have a look at \url{https://gnunet.org/dependencies} for a list of required dependencies | ||
116 | and \url{https://gnunet.org/generic_installation} for specific instructions for your operating system. | ||
117 | |||
118 | Please check the notes at the end of the configure process about required dependencies. | ||
119 | |||
120 | For GNUnet bootstrapping support and the http(s) plugin you should install \texttt{libgnurl}. | ||
121 | For the filesharing service you should install at least one of the datastore backends \texttt{mysql}, | ||
122 | \texttt{sqlite} or \texttt{postgresql}. | ||
123 | |||
124 | \subsection{Obtaining the latest version from Git} | ||
125 | |||
126 | The latest development version can obtained from our Git repository. To obtain | ||
127 | the code you need Git installed and checkout the repository using: | ||
128 | \lstset{language=bash} | ||
129 | \begin{lstlisting} | ||
130 | $ git clone https://gnunet.org/git/gnunet | ||
131 | \end{lstlisting} | ||
132 | After cloning the repository you have to execute | ||
133 | \lstset{language=bash} | ||
134 | \begin{lstlisting} | ||
135 | $ cd gnunet | ||
136 | $ ./bootstrap | ||
137 | \end{lstlisting} | ||
138 | |||
139 | The remainder of this tutorial assumes that you have Git Master checked out. | ||
140 | |||
141 | |||
142 | \subsection{Compiling and Installing GNUnet} | ||
143 | |||
144 | First, you need to install at least {\tt libgnupgerror} version | ||
145 | 1.27\footnote{\url{ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.27.tar.bz2}} | ||
146 | and {\tt libgcrypt} version | ||
147 | 1.7.6\footnote{\url{ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.7.6.tar.bz2}}. | ||
148 | |||
149 | \lstset{language=bash} | ||
150 | \begin{lstlisting} | ||
151 | $ wget ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.27.tar.bz2 | ||
152 | $ tar xf libgpg-error-1.27.tar.bz2 | ||
153 | $ cd libgpg-error-1.27 | ||
154 | $ ./configure | ||
155 | $ sudo make install | ||
156 | $ cd .. | ||
157 | \end{lstlisting} | ||
158 | |||
159 | \lstset{language=bash} | ||
160 | \begin{lstlisting} | ||
161 | $ wget ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.7.6.tar.bz2 | ||
162 | $ tar xf libgcrypt-1.7.6.tar.bz2 | ||
163 | $ cd libgcrypt-1.7.6 | ||
164 | $ ./configure | ||
165 | $ sudo make install | ||
166 | $ cd .. | ||
167 | \end{lstlisting} | ||
168 | |||
169 | \label{sub:install} | ||
170 | Assuming all dependencies are installed, the following commands will | ||
171 | compile and install GNUnet in your home directory. You can specify the | ||
172 | directory where GNUnet will be installed by changing the | ||
173 | \lstinline|--prefix| value when calling \lstinline|./configure|. If | ||
174 | you do not specifiy a prefix, GNUnet is installed in the directory | ||
175 | \lstinline|/usr/local|. When developing new applications you may want | ||
176 | to enable verbose logging by adding | ||
177 | \lstinline|--enable-logging=verbose|: | ||
178 | |||
179 | \lstset{language=bash} | ||
180 | \begin{lstlisting} | ||
181 | $ ./configure --prefix=$PREFIX --enable-logging | ||
182 | $ make | ||
183 | $ make install | ||
184 | \end{lstlisting} | ||
185 | |||
186 | After installing GNUnet you have to add your GNUnet installation to your path | ||
187 | environmental variable. In addition you have to create the \lstinline|.config| | ||
188 | directory in your home directory where GNUnet stores its data and an empty | ||
189 | GNUnet configuration file: | ||
190 | |||
191 | \lstset{language=bash} | ||
192 | \begin{lstlisting} | ||
193 | $ export PATH=$PATH:$PREFIX/bin | ||
194 | $ echo export PATH=$PREFIX/bin:\\$PATH >> ~/.bashrc | ||
195 | $ mkdir ~/.config/ | ||
196 | $ touch ~/.config/gnunet.conf | ||
197 | \end{lstlisting} | ||
198 | % $ | ||
199 | |||
200 | \subsection{Common Issues - Check your GNUnet installation} | ||
201 | |||
202 | You should check your installation to ensure that installing GNUnet | ||
203 | was successful up to this point. You should be able to access GNUnet's | ||
204 | binaries and run GNUnet's self check. | ||
205 | \lstset{language=bash} | ||
206 | \begin{lstlisting} | ||
207 | $ which gnunet-arm | ||
208 | \end{lstlisting} | ||
209 | should return \lstinline|$PREFIX/bin/gnunet-arm|. It should be | ||
210 | located in your GNUnet installation and the output should not be | ||
211 | empty. If you see an output like: | ||
212 | \lstset{language=bash} | ||
213 | \begin{lstlisting} | ||
214 | $ which gnunet-arm | ||
215 | $ | ||
216 | \end{lstlisting} | ||
217 | check your {\tt PATH} variable to ensure GNUnet's {\tt bin} directory is included. | ||
218 | |||
219 | GNUnet provides tests for all of its subcomponents. Run | ||
220 | \lstset{language=bash} | ||
221 | \begin{lstlisting} | ||
222 | $ make check | ||
223 | \end{lstlisting} | ||
224 | to execute tests for all components. {\tt make check} traverses all subdirectories in {\tt src}. | ||
225 | For every subdirectory you should get a message like this: | ||
226 | |||
227 | \begin{verbatim} | ||
228 | make[2]: Entering directory `/home/$USER/gnunet/contrib' | ||
229 | PASS: test_gnunet_prefix | ||
230 | ============= | ||
231 | 1 test passed | ||
232 | ============= | ||
233 | \end{verbatim} | ||
234 | |||
235 | |||
236 | \section{Background: GNUnet Architecture} | ||
237 | |||
238 | GNUnet is organized in layers and services. Each service is composed of a | ||
239 | main service implementation and a client library for other programs to use | ||
240 | the service's functionality, described by an API. This approach is shown in | ||
241 | figure~\ref{fig:service}. Some services provide an additional command line | ||
242 | tool to enable the user to interact with the service. | ||
243 | |||
244 | Very often it is other GNUnet services that will use these APIs to build the | ||
245 | higher layers of GNUnet on top of the lower ones. Each layer expands or extends | ||
246 | the functionality of the service below (for instance, to build a mesh on top of | ||
247 | a DHT). See figure ~\ref{fig:interaction} for an illustration of this approach. | ||
248 | |||
249 | \begin{figure}[!h] | ||
250 | \begin{center} | ||
251 | % \begin{subfigure} | ||
252 | \begin{subfigure}[b]{0.3\textwidth} | ||
253 | \centering | ||
254 | \includegraphics[width=\textwidth]{figs/Service.pdf} | ||
255 | \caption{Service with API and network protocol} | ||
256 | \label{fig:service} | ||
257 | \end{subfigure} | ||
258 | ~~~~~~~~~~ | ||
259 | \begin{subfigure}[b]{0.3\textwidth} | ||
260 | \centering | ||
261 | \includegraphics[width=\textwidth]{figs/System.pdf} | ||
262 | \caption{Service interaction} | ||
263 | \label{fig:interaction} | ||
264 | \end{subfigure} | ||
265 | \end{center} | ||
266 | \caption{GNUnet's layered system architecture} | ||
267 | \end{figure} | ||
268 | |||
269 | The main service implementation runs as a standalone process in the operating | ||
270 | system and the client code runs as part of the client program, so crashes of a | ||
271 | client do not affect the service process or other clients. The service and the | ||
272 | clients communicate via a message protocol to be defined and implemented by | ||
273 | the programmer. | ||
274 | |||
275 | |||
276 | \section{First Steps with GNUnet} | ||
277 | |||
278 | \subsection{Configure your peer} | ||
279 | |||
280 | First of all we need to configure your peer. Each peer is started with a configuration containing settings for GNUnet itself and its services. This configuration is based on the default configuration shipped with GNUnet and can be modified. The default configuration is located in the {\tt \$PREFIX/share/gnunet/config.d} directory. When starting a peer, you can specify a customized configuration using the the {\tt$-c$} command line switch when starting the ARM service and all other services. When using a modified configuration the default values are loaded and only values specified in the configuration file will replace the default values. | ||
281 | |||
282 | Since we want to start additional peers later, we need | ||
283 | some modifications from the default configuration. We need to create a separate service home and a file containing our modifications for this peer: | ||
284 | \lstset{language=bash} | ||
285 | \begin{lstlisting} | ||
286 | $ mkdir ~/gnunet1/ | ||
287 | $ touch peer1.conf | ||
288 | \end{lstlisting} | ||
289 | |||
290 | Now add the following lines to peer1.conf to use this directory. For | ||
291 | simplified usage we want to prevent the peer to connect to the GNUnet | ||
292 | network since this could lead to confusing output. This modifications | ||
293 | will replace the default settings: | ||
294 | \begin{verbatim} | ||
295 | [PATHS] | ||
296 | GNUNET_HOME = ~/gnunet1/ # Use this directory to store GNUnet data | ||
297 | [hostlist] | ||
298 | SERVERS = # prevent bootstrapping | ||
299 | \end{verbatim} | ||
300 | |||
301 | |||
302 | \subsection{Start a peer} | ||
303 | Each GNUnet instance (called peer) has an identity (\textit{peer ID}) based on a | ||
304 | cryptographic public private key pair. The peer ID is the printable hash of the | ||
305 | public key. | ||
306 | |||
307 | GNUnet services are controlled by a master service the so called \textit{Automatic Restart Manager} (ARM). | ||
308 | ARM starts, stops and even restarts services automatically or on demand when a client connects. | ||
309 | You interact with the ARM service using the \lstinline|gnunet-arm| tool. | ||
310 | GNUnet can then be started with \lstinline|gnunet-arm -s| and stopped with | ||
311 | \lstinline|gnunet-arm -e|. An additional service not automatically started | ||
312 | can be started using \lstinline|gnunet-arm -i <service name>| and stopped | ||
313 | using \lstinline|gnunet-arm -k <servicename>|. | ||
314 | |||
315 | Once you have started your peer, you can use many other GNUnet commands | ||
316 | to interact with it. For example, you can run: | ||
317 | \lstset{language=bash} | ||
318 | \begin{lstlisting} | ||
319 | $ gnunet-peerinfo -s | ||
320 | \end{lstlisting} | ||
321 | to obtain the public key of your peer. | ||
322 | You should see an output containing the peer ID similar to: | ||
323 | \lstset{language=bash} | ||
324 | \begin{lstlisting} | ||
325 | I am peer `0PA02UVRKQTS2C .. JL5Q78F6H0B1ACPV1CJI59MEQUMQCC5G'. | ||
326 | \end{lstlisting} | ||
327 | |||
328 | |||
329 | \subsection{Monitor a peer} | ||
330 | |||
331 | In this section, we will monitor the behaviour of our peer's DHT service with respect to a | ||
332 | specific key. First we will start GNUnet and then start the DHT service and use the DHT monitor tool | ||
333 | to monitor the PUT and GET commands we issue ussing the \lstinline|gnunet-dht-put| and | ||
334 | \lstinline|gnunet-dht-get| commands. Using the ``monitor'' line given below, you can observe the behavior of | ||
335 | your own peer's DHT with respect to the specified KEY: | ||
336 | |||
337 | \lstset{language=bash} | ||
338 | \begin{lstlisting} | ||
339 | $ gnunet-arm -c ~/peer1.conf -s # start gnunet with all default services | ||
340 | $ gnunet-arm -c ~/peer1.conf -i dht # start DHT service | ||
341 | $ cd ~/gnunet/src/dht; | ||
342 | $ ./gnunet-dht-monitor -c ~/peer1.conf -k KEY | ||
343 | \end{lstlisting} | ||
344 | Now open a separate terminal and change again to the \lstinline|gnunet/src/dht| directory: | ||
345 | \lstset{language=bash} | ||
346 | \begin{lstlisting} | ||
347 | $ cd ~/gnunet/src/dht | ||
348 | $ ./gnunet-dht-put -c ~/peer1.conf -k KEY -d VALUE # put VALUE under KEY in the DHT | ||
349 | $ ./gnunet/src/dht/gnunet-dht-get -c ~/peer1.conf -k KEY # get key KEY from the DHT | ||
350 | $ gnunet-statistics -c ~/peer1.conf # print statistics about current GNUnet state | ||
351 | $ gnunet-statistics -c ~/peer1.conf -s dht # print statistics about DHT service | ||
352 | \end{lstlisting} | ||
353 | % $ | ||
354 | |||
355 | |||
356 | \subsection{Starting Two Peers by Hand} | ||
357 | |||
358 | This section describes how to start two peers on the same machine by hand. | ||
359 | The process is rather painful, but the description is somewhat instructive. | ||
360 | In practice, you might prefer the automated method described in | ||
361 | Section~\ref{sec:testbed}. | ||
362 | |||
363 | \subsubsection{Setup a second peer} | ||
364 | We will now start a second peer on your machine. | ||
365 | For the second peer, you will need to manually create a modified | ||
366 | configuration file to avoid conflicts with ports and directories. | ||
367 | A peers configuration file is by default located in {\tt ~/.gnunet/gnunet.conf}. | ||
368 | This file is typically very short or even empty as only the differences to the | ||
369 | defaults need to be specified. The defaults are located in | ||
370 | many files in the {\tt \$PREFIX/share/gnunet/config.d} directory. | ||
371 | |||
372 | To configure the second peer, use the files {\tt | ||
373 | \$PREFIX/share/gnunet/config.d} as a template for your main | ||
374 | configuration file: | ||
375 | % | ||
376 | \lstset{language=bash} | ||
377 | \lstset{language=bash} | ||
378 | \begin{lstlisting} | ||
379 | $ cat $PREFIX/share/gnunet/config.d/*.conf > peer2.conf | ||
380 | \end{lstlisting} | ||
381 | Now you have to edit {\tt peer2.conf} and change: | ||
382 | \begin{itemize} | ||
383 | \itemsep0em | ||
384 | \item{\texttt{GNUNET\_TEST\_HOME} under \texttt{PATHS}} | ||
385 | \item{Every (uncommented) value for ``\texttt{PORT}'' (add 10000) in any | ||
386 | section (the option may be commented out if \texttt{PORT} is | ||
387 | prefixed by "\#", in this case, UNIX domain sockets are used | ||
388 | and the PORT option does not need to be touched) } | ||
389 | \item{Every value for ``\texttt{UNIXPATH}'' in any section (e.g. by adding a "-p2" suffix)} | ||
390 | \end{itemize} | ||
391 | to a fresh, unique value. Make sure that the \texttt{PORT} numbers stay | ||
392 | below 65536. From now on, whenever you interact with the second | ||
393 | peer, you need to specify {\tt -c peer2.conf} as an additional | ||
394 | command line argument. | ||
395 | |||
396 | Now, generate the 2nd peer's private key: | ||
397 | |||
398 | \lstset{language=bash} | ||
399 | \begin{lstlisting} | ||
400 | $ gnunet-peerinfo -s -c peer2.conf | ||
401 | \end{lstlisting} | ||
402 | % $ | ||
403 | |||
404 | This may take a while, generate entropy using your keyboard or mouse | ||
405 | as needed. Also, make sure the output is different from the {\tt | ||
406 | gnunet-peerinfo} output for the first peer (otherwise you made an | ||
407 | error in the configuration). | ||
408 | |||
409 | \subsubsection{Start the second peer and connect the peers} | ||
410 | |||
411 | Then, you can start a second peer using: | ||
412 | \lstset{language=bash} | ||
413 | \begin{lstlisting} | ||
414 | $ gnunet-arm -c peer2.conf -s | ||
415 | $ gnunet-arm -c peer2.conf -i dht | ||
416 | $ ~/gnunet/src/dht/gnunet-dht-put -c peer2.conf -k KEY -d VALUE | ||
417 | $ ~/gnunet/src/dht/gnunet-dht-get -c peer2.conf -k KEY | ||
418 | \end{lstlisting} | ||
419 | If you want the two peers to connect, you have multiple options: | ||
420 | \begin{itemize} | ||
421 | \itemsep0em | ||
422 | \item UDP neighbour discovery (automatic) | ||
423 | \item Setup a bootstrap server | ||
424 | \item Connect manually | ||
425 | \end{itemize} | ||
426 | To setup peer 1 as bootstrapping server change the configuration of | ||
427 | the first one to be a hostlist server by adding the following lines to | ||
428 | \texttt{peer1.conf} to enable bootstrapping server: | ||
429 | \begin{verbatim} | ||
430 | [hostlist] | ||
431 | OPTIONS = -p | ||
432 | \end{verbatim} | ||
433 | |||
434 | Then change {\tt peer2.conf} and replace the ``\texttt{SERVERS}'' line in the ``\texttt{[hostlist]}'' section with | ||
435 | ``\texttt{http://localhost:8080/}''. Restart both peers using: | ||
436 | \begin{lstlisting} | ||
437 | $ gnunet-arm -c peer1.conf -e # stop first peer | ||
438 | $ gnunet-arm -c peer1.conf -s # start first peer | ||
439 | $ gnunet-arm -c peer2.conf -s # start second peer | ||
440 | \end{lstlisting} | ||
441 | |||
442 | Note that if you start your peers without changing these settings, they | ||
443 | will use the ``global'' hostlist servers of the GNUnet P2P network and | ||
444 | likely connect to those peers. At that point, debugging might become | ||
445 | tricky as you're going to be connected to many more peers and would | ||
446 | likely observe traffic and behaviors that are not explicitly controlled | ||
447 | by you. | ||
448 | |||
449 | \subsubsection{How to connect manually} | ||
450 | |||
451 | If you want to use the \texttt{peerinfo} tool to connect your peers, you should: | ||
452 | \begin{itemize} | ||
453 | \itemsep0em | ||
454 | \item{Set {\tt FORCESTART = NO} in section {\tt hostlist} (to not connect to the global GNUnet)} | ||
455 | \item{Start both peers running {\tt gnunet-arm -c peer1.conf -s} and {\tt gnunet-arm -c peer2.conf -s}} | ||
456 | \item{Get \texttt{HELLO} message of the first peer running {\tt gnunet-peerinfo -c peer1.conf -g}} | ||
457 | \item{Give the output to the second peer by running {\tt gnunet-peerinfo -c peer2.conf -p '<output>'}} | ||
458 | \end{itemize} | ||
459 | |||
460 | Check that they are connected using {\tt gnunet-core -c peer1.conf}, which should give you the other peer's | ||
461 | peer identity: | ||
462 | \lstset{language=bash} | ||
463 | \begin{lstlisting} | ||
464 | $ gnunet-core -c peer1.conf | ||
465 | Peer `9TVUCS8P5A7ILLBGO6 [...shortened...] 1KNBJ4NGCHP3JPVULDG' | ||
466 | \end{lstlisting} | ||
467 | |||
468 | \subsection{Starting Peers Using the Testbed Service} \label{sec:testbed} | ||
469 | |||
470 | GNUnet's testbed service is used for testing scenarios where a number of peers | ||
471 | are to be started. The testbed can manage peers on a single host or on multiple | ||
472 | hosts in a distributed fashion. On a single affordable computer, it should be | ||
473 | possible to run around tens of peers without drastically increasing the load on the | ||
474 | system. | ||
475 | |||
476 | The testbed service can be access through its API | ||
477 | \texttt{include/gnunet\_testbed\_service.h}. The API provides many routines for | ||
478 | managing a group of peers. It also provides a helper function | ||
479 | \texttt{GNUNET\_TESTBED\_test\_run()} to quickly setup a minimalistic testing | ||
480 | environment on a single host. | ||
481 | |||
482 | This function takes a configuration file which will be used as a template | ||
483 | configuration for the peers. The testbed takes care of modifying relevant | ||
484 | options in the peers' configuration such as SERVICEHOME, PORT, UNIXPATH to | ||
485 | unique values so that peers run without running into conflicts. It also checks | ||
486 | and assigns the ports in configurations only if they are free. | ||
487 | |||
488 | Additionally, the testbed service also reads its options from the same | ||
489 | configuration file. Various available options and details about them can be | ||
490 | found in the testbed default configuration file \texttt{src/testbed/testbed.conf}. | ||
491 | |||
492 | With the testbed API, a sample test case can be structured as follows: | ||
493 | % <lynX> Is there a way to pick a more readable font for this include? | ||
494 | \lstset{language=C} | ||
495 | \lstinputlisting{testbed_test.c} | ||
496 | The source code for the above listing can be found at | ||
497 | \url{https://gnunet.org/git/gnunet.git/tree/doc/testbed_test.c} | ||
498 | or in the {\tt doc/} folder of your repository check-out. | ||
499 | After installing GNUnet, the above source code can be compiled as: | ||
500 | \lstset{language=bash} | ||
501 | \begin{lstlisting} | ||
502 | $ export CPPFLAGS="-I/path/to/gnunet/headers" | ||
503 | $ export LDFLAGS="-L/path/to/gnunet/libraries" | ||
504 | $ gcc $CPPFLAGS $LDFLAGS -o testbed-test testbed_test.c -lgnunettestbed -lgnunetdht -lgnunetutil | ||
505 | $ touch template.conf # Generate (empty) configuration | ||
506 | $ ./testbed-test # run it (press CTRL-C to stop) | ||
507 | \end{lstlisting} | ||
508 | The \texttt{CPPFLAGS} and \texttt{LDFLAGS} are necessary if GNUnet is installed | ||
509 | into a different directory other than \texttt{/usr/local}. | ||
510 | |||
511 | All of testbed API's peer management functions treat management actions as | ||
512 | operations and return operation handles. It is expected that the operations | ||
513 | begin immediately, but they may get delayed (to balance out load on the system). | ||
514 | The program using the API then has to take care of marking the operation as | ||
515 | ``done'' so that its associated resources can be freed immediately and other | ||
516 | waiting operations can be executed. Operations will be canceled if they are | ||
517 | marked as ``done'' before their completion. | ||
518 | |||
519 | An operation is treated as completed when it succeeds or fails. Completion of | ||
520 | an operation is either conveyed as events through \textit{controller event | ||
521 | callback} or through respective operation completion callbacks. In functions | ||
522 | which support completion notification through both controller event callback and | ||
523 | operation completion callback, first the controller event callback will be | ||
524 | called. If the operation is not marked as done in that callback or if the | ||
525 | callback is given as NULL when creating the operation, the operation completion | ||
526 | callback will be called. The API documentation shows which event are to be | ||
527 | expected in the controller event notifications. It also documents any | ||
528 | exceptional behaviour. | ||
529 | |||
530 | Once the peers are started, test cases often need to connect some of the peers' | ||
531 | services. Normally, opening a connect to a peer's service requires the peer's | ||
532 | configuration. While using testbed, the testbed automatically generates | ||
533 | per-peer configuration. Accessing those configurations directly through file | ||
534 | system is discouraged as their locations are dynamically created and will be | ||
535 | different among various runs of testbed. To make access to these configurations | ||
536 | easy, testbed API provides the function | ||
537 | \texttt{GNUNET\_TESTBED\_service\_connect()}. This function fetches the | ||
538 | configuration of a given peer and calls the \textit{Connect Adapter}. | ||
539 | In the example code, it is the \texttt{dht\_ca}. A connect adapter is expected | ||
540 | to open the connection to the needed service by using the provided configuration | ||
541 | and return the created service connection handle. Successful connection to the | ||
542 | needed service is signaled through \texttt{service\_connect\_comp\_cb}. | ||
543 | |||
544 | A dual to connect adapter is the \textit{Disconnect Adapter}. This callback is | ||
545 | called after the connect adapter has been called when the operation from | ||
546 | \texttt{GNUNET\_TESTBED\_service\_connect()} is marked as ``done''. It has to | ||
547 | disconnect from the service with the provided service handle (\texttt{op\_result}). | ||
548 | |||
549 | \exercise{Find out how many peers you can run on your system.} | ||
550 | |||
551 | \exercise{Find out how to create a 2D torus topology by changing the | ||
552 | options in the configuration file.\footnote{See \url{https://gnunet.org/supported-topologies}} | ||
553 | Then use the DHT API to store and retrieve values in the | ||
554 | network.} | ||
555 | |||
556 | |||
557 | \section{Developing Applications} | ||
558 | |||
559 | \subsection{gnunet-ext} | ||
560 | To develop a new peer-to-peer application or to extend GNUnet we provide | ||
561 | a template build system for writing GNUnet extensions in C. It can be | ||
562 | obtained as follows: | ||
563 | |||
564 | \lstset{language=bash} | ||
565 | \begin{lstlisting} | ||
566 | $ git clone https://gnunet.org/git/gnunet-ext | ||
567 | $ cd gnunet-ext/ | ||
568 | $ ./bootstrap | ||
569 | $ ./configure --prefix=$PREFIX --with-gnunet=$PREFIX | ||
570 | $ make | ||
571 | $ make install | ||
572 | $ make check | ||
573 | \end{lstlisting} | ||
574 | % $ | ||
575 | |||
576 | The GNUnet ext template includes examples and a working buildsystem for a new GNUnet service. | ||
577 | A common GNUnet service consists of the following parts which will be discussed in detail in the | ||
578 | remainder of this document. The functionality of a GNUnet service is implemented in: | ||
579 | |||
580 | \begin{itemize} | ||
581 | \itemsep0em | ||
582 | \item the GNUnet service (\lstinline|gnunet-ext/src/ext/gnunet-service-ext.c|) | ||
583 | \item the client API (\lstinline|gnunet-ext/src/ext/ext_api.c|) | ||
584 | \item the client application using the service API (\lstinline|gnunet-ext/src/ext/gnunet-ext.c|) | ||
585 | |||
586 | |||
587 | \end{itemize} | ||
588 | |||
589 | The interfaces for these entities are defined in: | ||
590 | \begin{itemize} | ||
591 | \itemsep0em | ||
592 | \item client API interface (\lstinline|gnunet-ext/src/ext/ext.h|) | ||
593 | \item the service interface (\lstinline|gnunet-ext/src/include/gnunet_service_SERVICE.h|) | ||
594 | \item the P2P protocol (\lstinline|gnunet-ext/src/include/gnunet_protocols_ext.h|) | ||
595 | \end{itemize} | ||
596 | |||
597 | |||
598 | In addition the \texttt{ext} systems provides: | ||
599 | \begin{itemize} | ||
600 | \itemsep0em | ||
601 | \item a test testing the API (\lstinline|gnunet-ext/src/ext/test_ext_api.c|) | ||
602 | \item a configuration template for the service (\lstinline|gnunet-ext/src/ext/ext.conf.in|) | ||
603 | \end{itemize} | ||
604 | |||
605 | |||
606 | \subsection{Adapting the Template} | ||
607 | |||
608 | The first step for writing any extension with a new service is to | ||
609 | ensure that the {\tt ext.conf.in} file contains entries for the | ||
610 | \texttt{UNIXPATH}, \texttt{PORT} and \texttt{BINARY} for the service in a section named after | ||
611 | the service. | ||
612 | |||
613 | If you want to adapt the template rename the {\tt ext.conf.in} to match your | ||
614 | services name, you have to modify the \texttt{AC\_OUTPUT} section in {\tt configure.ac} | ||
615 | in the \texttt{gnunet-ext} root. | ||
616 | |||
617 | \section{Writing a Client Application} | ||
618 | |||
619 | When writing any client application (for example, a command-line | ||
620 | tool), the basic structure is to start with the {\tt | ||
621 | GNUNET\_PROGRAM\_run} function. This function will parse | ||
622 | command-line options, setup the scheduler and then invoke the {\tt | ||
623 | run} function (with the remaining non-option arguments) and a handle | ||
624 | to the parsed configuration (and the configuration file name that was | ||
625 | used, which is typically not needed): | ||
626 | |||
627 | \lstset{language=C} | ||
628 | \begin{lstlisting} | ||
629 | #include <gnunet/platform.h> | ||
630 | #include <gnunet/gnunet_util_lib.h> | ||
631 | |||
632 | static int ret; | ||
633 | |||
634 | static void | ||
635 | run (void *cls, | ||
636 | char *const *args, | ||
637 | const char *cfgfile, | ||
638 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
639 | { | ||
640 | // main code here | ||
641 | ret = 0; | ||
642 | } | ||
643 | |||
644 | int | ||
645 | main (int argc, char *const *argv) | ||
646 | { | ||
647 | struct GNUNET_GETOPT_CommandLineOption options[] = { | ||
648 | GNUNET_GETOPT_OPTION_END | ||
649 | }; | ||
650 | return (GNUNET_OK == | ||
651 | GNUNET_PROGRAM_run (argc, | ||
652 | argv, | ||
653 | "binary-name", | ||
654 | gettext_noop ("binary description text"), | ||
655 | options, &run, NULL)) ? ret : 1; | ||
656 | } | ||
657 | \end{lstlisting} | ||
658 | |||
659 | \subsection{Handling command-line options} | ||
660 | |||
661 | Options can then be added easily by adding global variables and | ||
662 | expanding the {\tt options} array. For example, the following would | ||
663 | add a string-option and a binary flag (defaulting to {\tt NULL} and | ||
664 | {\tt GNUNET\_NO} respectively): | ||
665 | |||
666 | \lstset{language=C} | ||
667 | \begin{lstlisting} | ||
668 | static char *string_option; | ||
669 | static int a_flag; | ||
670 | |||
671 | // ... | ||
672 | struct GNUNET_GETOPT_CommandLineOption options[] = { | ||
673 | GNUNET_GETOPT_option_string ('s', "name", "SOMESTRING", | ||
674 | gettext_noop ("text describing the string_option NAME"), | ||
675 | &string_option}, | ||
676 | GNUNET_GETOPT_option_flag ('f', "flag", | ||
677 | gettext_noop ("text describing the flag option"), | ||
678 | &a_flag), | ||
679 | GNUNET_GETOPT_OPTION_END | ||
680 | }; | ||
681 | string_option = NULL; | ||
682 | a_flag = GNUNET_SYSERR; | ||
683 | // ... | ||
684 | \end{lstlisting} | ||
685 | |||
686 | Issues such as displaying some helpful text describing options using | ||
687 | the {\tt --help} argument and error handling are taken care of when | ||
688 | using this approach. Other {\tt GNUNET\_GETOPT\_}-functions can be used | ||
689 | to obtain integer value options, increment counters, etc. You can | ||
690 | even write custom option parsers for special circumstances not covered | ||
691 | by the available handlers. To check if an argument was specified by the | ||
692 | user you initialize the variable with a specific value (e.g. NULL for | ||
693 | a string and GNUNET\_SYSERR for a integer) and check after parsing | ||
694 | happened if the values were modified. | ||
695 | |||
696 | Inside the {\tt run} method, the program would perform the | ||
697 | application-specific logic, which typically involves initializing and | ||
698 | using some client library to interact with the service. The client | ||
699 | library is supposed to implement the IPC whereas the service provides | ||
700 | more persistent P2P functions. | ||
701 | |||
702 | \exercise{Add a few command-line options and print them inside | ||
703 | of {\tt run}. What happens if the user gives invalid arguments?} | ||
704 | |||
705 | \subsection{Writing a Client Library} | ||
706 | |||
707 | The first and most important step in writing a client library is to | ||
708 | decide on an API for the library. Typical API calls include | ||
709 | connecting to the service, performing application-specific requests | ||
710 | and cleaning up. Many examples for such service APIs can be found | ||
711 | in the {\tt gnunet/src/include/gnunet\_*\_service.h} files. | ||
712 | |||
713 | Then, a client-service protocol needs to be designed. This typically | ||
714 | involves defining various message formats in a header that will be | ||
715 | included by both the service and the client library (but is otherwise | ||
716 | not shared and hence located within the service's directory and not | ||
717 | installed by {\tt make install}). Each message must start with a {\tt | ||
718 | struct GNUNET\_MessageHeader} and must be shorter than 64k. By | ||
719 | convention, all fields in IPC (and P2P) messages must be in big-endian | ||
720 | format (and thus should be read using {\tt ntohl} and similar | ||
721 | functions and written using {\tt htonl} and similar functions). | ||
722 | Unique message types must be defined for each message struct in the | ||
723 | {\tt gnunet\_protocols.h} header (or an extension-specific include | ||
724 | file). | ||
725 | |||
726 | \subsubsection{Connecting to the Service} | ||
727 | |||
728 | Before a client library can implement the application-specific protocol | ||
729 | with the service, a connection must be created: | ||
730 | |||
731 | \lstset{language=C} | ||
732 | \begin{lstlisting} | ||
733 | struct GNUNET_MQ_MessageHandlers handlers[] = { | ||
734 | // ... | ||
735 | GNUNET_MQ_handler_end () | ||
736 | }; | ||
737 | struct GNUNET_MQ_Handle *mq; | ||
738 | |||
739 | mq = GNUNET_CLIENT_connect (cfg, "service-name", handlers, &error_cb, NULL); | ||
740 | \end{lstlisting} | ||
741 | |||
742 | As a result a {\tt GNUNET\_MQ\_Handle} is returned | ||
743 | which can to used henceforth to transmit messages to | ||
744 | the service. | ||
745 | The complete MQ API can be found in {\tt gnunet\_mq\_lib.h}. | ||
746 | The {\tt hanlders} array in the example above is incomplete. | ||
747 | Here is where you will define which messages you expect to | ||
748 | receive from the service, and which functions handle them. | ||
749 | The {\tt error\_cb} is a function that is to be called whenever | ||
750 | there are errors communicating with the service. | ||
751 | |||
752 | \subsubsection{Sending messages} | ||
753 | |||
754 | In GNUnet, messages are always sent beginning with a {\tt struct GNUNET\_MessageHeader} | ||
755 | in big endian format. This header defines the size and the type of the | ||
756 | message, the payload follows after this header. | ||
757 | |||
758 | \lstset{language=C} | ||
759 | \begin{lstlisting} | ||
760 | struct GNUNET_MessageHeader | ||
761 | { | ||
762 | uint16_t size GNUNET_PACKED; | ||
763 | uint16_t type GNUNET_PACKED; | ||
764 | }; | ||
765 | \end{lstlisting} | ||
766 | |||
767 | Existing message types are defined in {\tt gnunet\_protocols.h}\\ | ||
768 | A common way to create a message is with an envelope: | ||
769 | |||
770 | \lstset{language=C} | ||
771 | \begin{lstlisting} | ||
772 | struct GNUNET_MQ_Envelope *env; | ||
773 | struct GNUNET_MessageHeader *msg; | ||
774 | |||
775 | env = GNUNET_MQ_msg_extra (msg, payload_size, GNUNET_MY_MESSAGE_TYPE); | ||
776 | memcpy (&msg[1], &payload, payload_size); | ||
777 | // Send message via message queue 'mq' | ||
778 | GNUNET_mq_send (mq, env); | ||
779 | \end{lstlisting} | ||
780 | |||
781 | \exercise{Define a message struct that includes a 32-bit | ||
782 | unsigned integer in addition to the standard GNUnet MessageHeader. | ||
783 | Add a C struct and define a fresh protocol number for your message. | ||
784 | (Protocol numbers in gnunet-ext are defined in \lstinline|gnunet-ext/src/include/gnunet_protocols_ext.h|)} | ||
785 | |||
786 | \exercise{Find out how you can determine the number of messages in a message queue.} | ||
787 | |||
788 | \exercise{Find out how you can determine when a message you have queued was actually transmitted.} | ||
789 | |||
790 | \exercise{Define a helper function to transmit a 32-bit | ||
791 | unsigned integer (as payload) to a service using some given client | ||
792 | handle.} | ||
793 | |||
794 | |||
795 | \subsubsection{Receiving Replies from the Service} | ||
796 | |||
797 | Clients can receive messages from the service using the handlers | ||
798 | specified in the {\tt handlers} array we specified when connecting | ||
799 | to the service. Entries in the the array are usually created using | ||
800 | one of two macros, depending on whether the message is fixed size | ||
801 | or variable size. Variable size messages are managed using two | ||
802 | callbacks, one to check that the message is well-formed, the other | ||
803 | to actually process the message. Fixed size messages are fully | ||
804 | checked by the MQ-logic, and thus only need to provide the handler | ||
805 | to process the message. Note that the prefixes {\tt check\_} | ||
806 | and {\tt handle\_} are mandatory. | ||
807 | |||
808 | \lstset{language=c} | ||
809 | \begin{lstlisting} | ||
810 | static void | ||
811 | handle_fix (void *cls, const struct MyMessage *msg) | ||
812 | { | ||
813 | // process 'msg' | ||
814 | } | ||
815 | |||
816 | static int | ||
817 | check_var (void *cls, const struct MyVarMessage *msg) | ||
818 | { | ||
819 | // check 'msg' is well-formed | ||
820 | return GNUNET_OK; | ||
821 | } | ||
822 | |||
823 | static void | ||
824 | handle_var (void *cls, const struct MyVarMessage *msg) | ||
825 | { | ||
826 | // process 'msg' | ||
827 | } | ||
828 | |||
829 | struct GNUNET_MQ_MessageHandler handlers[] = { | ||
830 | GNUNET_MQ_hd_fixed_size (fix, | ||
831 | GNUNET_MESSAGE_TYPE_MY_FIX, | ||
832 | struct MyMessage, | ||
833 | NULL), | ||
834 | GNUNET_MQ_hd_fixed_size (var, | ||
835 | GNUNET_MESSAGE_TYPE_MY_VAR, | ||
836 | struct MyVarMessage, | ||
837 | NULL), | ||
838 | |||
839 | GNUNET_MQ_handler_end () | ||
840 | }; | ||
841 | \end{lstlisting} | ||
842 | |||
843 | \exercise{Expand your helper function to receive a response message | ||
844 | (for example, containing just the {\tt struct GNUnet MessageHeader} | ||
845 | without any payload). Upon receiving the service's response, you | ||
846 | should call a callback provided to your helper function's API.} | ||
847 | |||
848 | \exercise{Figure out where you can pass values to the closures ({\tt cls}).} | ||
849 | |||
850 | |||
851 | \subsection{Writing a user interface} | ||
852 | |||
853 | Given a client library, all it takes to access a service now is to | ||
854 | combine calls to the client library with parsing command-line | ||
855 | options. | ||
856 | |||
857 | \exercise{Call your client API from your {\tt run()} method in your | ||
858 | client application to send a request to the service. For example, | ||
859 | send a 32-bit integer value based on a number given at the | ||
860 | command-line to the service.} | ||
861 | |||
862 | |||
863 | |||
864 | \section{Writing a Service} | ||
865 | |||
866 | Before you can test the client you've written so far, you'll need to also | ||
867 | implement the corresponding service. | ||
868 | |||
869 | |||
870 | \subsection{Code Placement} | ||
871 | |||
872 | New services are placed in their own subdirectory under {\tt gnunet/src}. | ||
873 | This subdirectory should contain the API implementation file {\tt SERVICE\_api.c}, | ||
874 | the description of the client-service protocol {\tt SERVICE.h} and P2P protocol | ||
875 | {\tt SERVICE\_protocol.h}, the implementation of the service itself | ||
876 | {\tt gnunet-service-SERVICE.h} and several files for tests, including test code | ||
877 | and configuration files. | ||
878 | |||
879 | \subsection{Starting a Service} | ||
880 | |||
881 | The key API definition for creating a service is the {\tt GNUNET\_SERVICE\_MAIN} macro: | ||
882 | \lstset{language=C} | ||
883 | \begin{lstlisting} | ||
884 | GNUNET_SERVICE_MAIN | ||
885 | ("service-name", | ||
886 | GNUNET_SERVICE_OPTION_NONE, | ||
887 | &run, | ||
888 | &client_connect_cb, | ||
889 | &client_disconnect_cb, | ||
890 | NULL, | ||
891 | GNUNET_MQ_hd_fixed_size (...), | ||
892 | GNUNET_MQ_hd_var_size (...), | ||
893 | GNUNET_MQ_handler_end ()); | ||
894 | \end{lstlisting} | ||
895 | |||
896 | In addition to the service name and flags, the macro takes three | ||
897 | functions, typically called {\tt run}, {\tt client\_connect\_cb} and | ||
898 | {\tt client\_disconnect\_cb} as well as an array of message handlers | ||
899 | that will be called for incoming messages from clients. | ||
900 | |||
901 | A minimal version of the three central service funtions would look | ||
902 | like this: | ||
903 | |||
904 | \lstset{language=c} | ||
905 | \begin{lstlisting} | ||
906 | static void | ||
907 | run (void *cls, | ||
908 | const struct GNUNET_CONFIGURATION_Handle *c, | ||
909 | struct GNUNET_SERVICE_Handle *service) | ||
910 | { | ||
911 | } | ||
912 | |||
913 | static void * | ||
914 | client_connect_cb (void *cls, | ||
915 | struct GNUNET_SERVICE_Client *c, | ||
916 | struct GNUNET_MQ_Handle *mq) | ||
917 | { | ||
918 | return c; | ||
919 | } | ||
920 | |||
921 | static void | ||
922 | client_disconnect_cb (void *cls, | ||
923 | struct GNUNET_SERVICE_Client *c, | ||
924 | void *internal_cls) | ||
925 | { | ||
926 | GNUNET_assert (c == internal_cls); | ||
927 | } | ||
928 | \end{lstlisting} | ||
929 | |||
930 | \exercise{Write a stub service that processes no messages at all | ||
931 | in your code. Create a default configuration for it, integrate it | ||
932 | with the build system and start the service from {\tt | ||
933 | gnunet-service-arm} using {\tt gnunet-arm -i NAME}.} | ||
934 | |||
935 | \exercise{Figure out how to set the closure ({\tt cls}) for handlers | ||
936 | of a service.} | ||
937 | |||
938 | \exercise{Figure out how to send messages from the service back to the | ||
939 | client.} | ||
940 | |||
941 | Each handler function in the service {\bf must} eventually (possibly in some | ||
942 | asynchronous continuation) call {\tt GNUNET\_SERVICE\_client\_continue()}. | ||
943 | Only after this call additional messages from the same client may | ||
944 | be processed. This way, the service can throttle processing messages | ||
945 | from the same client. | ||
946 | |||
947 | \exercise{Change the service to ``handle'' the message from your | ||
948 | client (for now, by printing a message). What happens if you | ||
949 | forget to call {\tt GNUNET\_SERVICE\_client\_continue()}?} | ||
950 | |||
951 | |||
952 | \section{Interacting directly with other Peers using the CORE Service} | ||
953 | |||
954 | FIXME: This section still needs to be updated to the lastest API! | ||
955 | |||
956 | One of the most important services in GNUnet is the \texttt{CORE} service | ||
957 | managing connections between peers and handling encryption between peers. | ||
958 | |||
959 | One of the first things any service that extends the P2P protocol typically does | ||
960 | is connect to the \texttt{CORE} service using: | ||
961 | |||
962 | \lstset{language=C} | ||
963 | \begin{lstlisting} | ||
964 | #include <gnunet/gnunet_core_service.h> | ||
965 | |||
966 | struct GNUNET_CORE_Handle * | ||
967 | GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
968 | void *cls, | ||
969 | GNUNET_CORE_StartupCallback init, | ||
970 | GNUNET_CORE_ConnectEventHandler connects, | ||
971 | GNUNET_CORE_DisconnectEventHandler disconnects, | ||
972 | const struct GNUNET_MQ_MessageHandler *handlers); | ||
973 | \end{lstlisting} | ||
974 | |||
975 | \subsection{New P2P connections} | ||
976 | |||
977 | Before any traffic with a different peer can be exchanged, the peer must be | ||
978 | known to the service. This is notified by the \texttt{CORE} {\tt connects} callback, | ||
979 | which communicates the identity of the new peer to the service: | ||
980 | |||
981 | \lstset{language=C} | ||
982 | \begin{lstlisting} | ||
983 | void * | ||
984 | connects (void *cls, | ||
985 | const struct GNUNET_PeerIdentity *peer, | ||
986 | struct GNUNET_MQ_Handle *mq) | ||
987 | { | ||
988 | return mq; | ||
989 | } | ||
990 | \end{lstlisting} | ||
991 | |||
992 | Note that whatever you return from {\tt connects} is given as the | ||
993 | {\it cls} argument to the message handlers for messages from | ||
994 | the respective peer. | ||
995 | |||
996 | \exercise{Create a service that connects to the \texttt{CORE}. Then | ||
997 | start (and connect) two peers and print a message once your connect | ||
998 | callback is invoked.} | ||
999 | |||
1000 | \subsection{Receiving P2P Messages} | ||
1001 | |||
1002 | To receive messages from \texttt{CORE}, you pass the desired | ||
1003 | {\em handlers} to the {\tt GNUNET\_CORE\_connect()} function, | ||
1004 | just as we showed for services. | ||
1005 | |||
1006 | It is your responsibility to process messages fast enough or | ||
1007 | to implement flow control. If an application does not process | ||
1008 | CORE messages fast enough, CORE will randomly drop messages | ||
1009 | to not keep a very long queue in memory. | ||
1010 | |||
1011 | \exercise{Start one peer with a new service that has a message | ||
1012 | handler and start a second peer that only has your ``old'' service | ||
1013 | without message handlers. Which ``connect'' handlers are invoked when | ||
1014 | the two peers are connected? Why?} | ||
1015 | |||
1016 | |||
1017 | \subsection{Sending P2P Messages} | ||
1018 | |||
1019 | You can transmit messages to other peers using the {\it mq} you were | ||
1020 | given during the {\tt connect} callback. Note that the {\it mq} | ||
1021 | automatically is released upon {\tt disconnect} and that you must | ||
1022 | not use it afterwards. | ||
1023 | |||
1024 | It is your responsibility to not over-fill the message queue, GNUnet | ||
1025 | will send the messages roughly in the order given as soon as possible. | ||
1026 | |||
1027 | \exercise{Write a service that upon connect sends messages as | ||
1028 | fast as possible to the other peer (the other peer should run a | ||
1029 | service that ``processes'' those messages). How fast is the | ||
1030 | transmission? Count using the STATISTICS service on both ends. Are | ||
1031 | messages lost? How can you transmit messages faster? What happens if | ||
1032 | you stop the peer that is receiving your messages?} | ||
1033 | |||
1034 | |||
1035 | \subsection{End of P2P connections} | ||
1036 | |||
1037 | If a message handler returns {\tt GNUNET\_SYSERR}, the remote peer shuts down or | ||
1038 | there is an unrecoverable network disconnection, CORE notifies the service that | ||
1039 | the peer disconnected. After this notification no more messages will be received | ||
1040 | from the peer and the service is no longer allowed to send messages to the peer. | ||
1041 | The disconnect callback looks like the following: | ||
1042 | |||
1043 | \lstset{language=C} | ||
1044 | \begin{lstlisting} | ||
1045 | void | ||
1046 | disconnects (void *cls, | ||
1047 | const struct GNUNET_PeerIdentity * peer) | ||
1048 | { | ||
1049 | /* Remove peer's identity from known peers */ | ||
1050 | /* Make sure no messages are sent to peer from now on */ | ||
1051 | } | ||
1052 | \end{lstlisting} | ||
1053 | |||
1054 | \exercise{Fix your service to handle peer disconnects.} | ||
1055 | |||
1056 | \section{Storing peer-specific data using the PEERSTORE service} | ||
1057 | |||
1058 | GNUnet's PEERSTORE service offers a persistorage for arbitrary peer-specific data. | ||
1059 | Other GNUnet services can use the PEERSTORE to store, retrieve and monitor data records. | ||
1060 | Each data record stored with PEERSTORE contains the following fields: | ||
1061 | |||
1062 | \begin{itemize} | ||
1063 | \itemsep0em | ||
1064 | \item subsystem: Name of the subsystem responsible for the record. | ||
1065 | \item peerid: Identity of the peer this record is related to. | ||
1066 | \item key: a key string identifying the record. | ||
1067 | \item value: binary record value. | ||
1068 | \item expiry: record expiry date. | ||
1069 | \end{itemize} | ||
1070 | |||
1071 | The first step is to start a connection to the PEERSTORE service: | ||
1072 | \begin{lstlisting} | ||
1073 | #include "gnunet_peerstore_service.h" | ||
1074 | |||
1075 | peerstore_handle = GNUNET_PEERSTORE_connect (cfg); | ||
1076 | \end{lstlisting} | ||
1077 | The service handle \lstinline|peerstore_handle| will be needed for all subsequent | ||
1078 | PEERSTORE operations. | ||
1079 | |||
1080 | \subsection{Storing records} | ||
1081 | |||
1082 | To store a new record, use the following function: | ||
1083 | \begin{lstlisting} | ||
1084 | struct GNUNET_PEERSTORE_StoreContext * | ||
1085 | GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h, | ||
1086 | const char *sub_system, | ||
1087 | const struct GNUNET_PeerIdentity *peer, | ||
1088 | const char *key, | ||
1089 | const void *value, | ||
1090 | size_t size, | ||
1091 | struct GNUNET_TIME_Absolute expiry, | ||
1092 | enum GNUNET_PEERSTORE_StoreOption options, | ||
1093 | GNUNET_PEERSTORE_Continuation cont, | ||
1094 | void *cont_cls); | ||
1095 | \end{lstlisting} | ||
1096 | |||
1097 | The \lstinline|options| parameter can either be \lstinline|GNUNET_PEERSTORE_STOREOPTION_MULTIPLE| | ||
1098 | which means that multiple values can be stored under the same key combination (subsystem, peerid, key), | ||
1099 | or \lstinline|GNUNET_PEERSTORE_STOREOPTION_REPLACE| which means that PEERSTORE will replace any | ||
1100 | existing values under the given key combination (subsystem, peerid, key) with the new given value. | ||
1101 | |||
1102 | The continuation function \lstinline|cont| will be called after the store request is successfully | ||
1103 | sent to the PEERSTORE service. This does not guarantee that the record is successfully stored, only | ||
1104 | that it was received by the service. | ||
1105 | |||
1106 | The \lstinline|GNUNET_PEERSTORE_store| function returns a handle to the store operation. This handle | ||
1107 | can be used to cancel the store operation only before the continuation function is called: | ||
1108 | \begin{lstlisting} | ||
1109 | void | ||
1110 | GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc); | ||
1111 | \end{lstlisting} | ||
1112 | |||
1113 | \subsection{Retrieving records} | ||
1114 | |||
1115 | To retrieve stored records, use the following function: | ||
1116 | \begin{lstlisting} | ||
1117 | struct GNUNET_PEERSTORE_IterateContext * | ||
1118 | GNUNET_PEERSTORE_iterate (struct GNUNET_PEERSTORE_Handle *h, | ||
1119 | const char *sub_system, | ||
1120 | const struct GNUNET_PeerIdentity *peer, | ||
1121 | const char *key, | ||
1122 | struct GNUNET_TIME_Relative timeout, | ||
1123 | GNUNET_PEERSTORE_Processor callback, | ||
1124 | void *callback_cls); | ||
1125 | \end{lstlisting} | ||
1126 | The values of \lstinline|peer| and \lstinline|key| can be \lstinline|NULL|. This allows the | ||
1127 | iteration over values stored under any of the following key combinations: | ||
1128 | \begin{itemize} | ||
1129 | \itemsep0em | ||
1130 | \item (subsystem) | ||
1131 | \item (subsystem, peerid) | ||
1132 | \item (subsystem, key) | ||
1133 | \item (subsystem, peerid, key) | ||
1134 | \end{itemize} | ||
1135 | |||
1136 | The \lstinline|callback| function will be called once with each retrieved record and once | ||
1137 | more with a \lstinline|NULL| record to signal the end of results. | ||
1138 | |||
1139 | The \lstinline|GNUNET_PEERSTORE_iterate| function returns a handle to the iterate operation. This | ||
1140 | handle can be used to cancel the iterate operation only before the callback function is called with | ||
1141 | a \lstinline|NULL| record. | ||
1142 | |||
1143 | \subsection{Monitoring records} | ||
1144 | |||
1145 | PEERSTORE offers the functionality of monitoring for new records stored under a specific key | ||
1146 | combination (subsystem, peerid, key). To start the monitoring, use the following function: | ||
1147 | \begin{lstlisting} | ||
1148 | struct GNUNET_PEERSTORE_WatchContext * | ||
1149 | GNUNET_PEERSTORE_watch (struct GNUNET_PEERSTORE_Handle *h, | ||
1150 | const char *sub_system, | ||
1151 | const struct GNUNET_PeerIdentity *peer, | ||
1152 | const char *key, | ||
1153 | GNUNET_PEERSTORE_Processor callback, | ||
1154 | void *callback_cls); | ||
1155 | \end{lstlisting} | ||
1156 | |||
1157 | Whenever a new record is stored under the given key combination, the \lstinline|callback| function | ||
1158 | will be called with this new record. This will continue until the connection to the PEERSTORE service | ||
1159 | is broken or the watch operation is canceled: | ||
1160 | \begin{lstlisting} | ||
1161 | void | ||
1162 | GNUNET_PEERSTORE_watch_cancel (struct GNUNET_PEERSTORE_WatchContext *wc); | ||
1163 | \end{lstlisting} | ||
1164 | |||
1165 | \subsection{Disconnecting from PEERSTORE} | ||
1166 | |||
1167 | When the connection to the PEERSTORE service is no longer needed, disconnect using the following | ||
1168 | function: | ||
1169 | \begin{lstlisting} | ||
1170 | void | ||
1171 | GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h, int sync_first); | ||
1172 | \end{lstlisting} | ||
1173 | |||
1174 | If the \lstinline|sync_first| flag is set to \lstinline|GNUNET_YES|, the API will delay the | ||
1175 | disconnection until all store requests are received by the PEERSTORE service. Otherwise, | ||
1176 | it will disconnect immediately. | ||
1177 | |||
1178 | |||
1179 | \section{Using the DHT} | ||
1180 | |||
1181 | The DHT allows to store data so other peers in the P2P network can | ||
1182 | access it and retrieve data stored by any peers in the network. | ||
1183 | This section will explain how to use the DHT. Of course, the first | ||
1184 | thing to do is to connect to the DHT service: | ||
1185 | \lstset{language=C} | ||
1186 | \begin{lstlisting} | ||
1187 | dht_handle = GNUNET_DHT_connect (cfg, parallel_requests); | ||
1188 | \end{lstlisting} | ||
1189 | The second parameter indicates how many requests in parallel to expect. | ||
1190 | It is not a hard limit, but a good approximation will make the DHT more | ||
1191 | efficient. | ||
1192 | |||
1193 | \subsection{Storing data in the DHT} | ||
1194 | Since the DHT is a dynamic environment (peers join and leave frequently) | ||
1195 | the data that we put in the DHT does not stay there indefinitely. It is | ||
1196 | important to ``refresh'' the data periodically by simply storing it again, | ||
1197 | in order to make sure other peers can access it. | ||
1198 | |||
1199 | The put API call offers a callback to signal that the PUT request has been | ||
1200 | sent. This does not guarantee that the data is accessible to others peers, | ||
1201 | or even that is has been stored, only that the service has requested to | ||
1202 | a neighboring peer the retransmission of the PUT request towards its final | ||
1203 | destination. Currently there is no feedback about whether or not the data | ||
1204 | has been sucessfully stored or where it has been stored. In order to improve | ||
1205 | the availablilty of the data and to compensate for possible errors, peers leaving | ||
1206 | and other unfavorable events, just make several PUT requests! | ||
1207 | |||
1208 | \lstset{language=C} | ||
1209 | \begin{lstlisting} | ||
1210 | static void | ||
1211 | message_sent_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
1212 | { | ||
1213 | // Request has left local node | ||
1214 | } | ||
1215 | |||
1216 | struct GNUNET_DHT_PutHandle * | ||
1217 | GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, | ||
1218 | const struct GNUNET_HashCode *key, | ||
1219 | uint32_t desired_replication_level, | ||
1220 | enum GNUNET_DHT_RouteOption options, | ||
1221 | enum GNUNET_BLOCK_Type type, size_t size, const void *data, | ||
1222 | struct GNUNET_TIME_Absolute exp, | ||
1223 | struct GNUNET_TIME_Relative timeout, | ||
1224 | GNUNET_DHT_PutContinuation cont, void *cont_cls) | ||
1225 | \end{lstlisting} | ||
1226 | |||
1227 | \exercise{Store a value in the DHT periodically to make sure it is available | ||
1228 | over time. You might consider using the function GNUNET\_SCHEDULER\_add\_delayed and | ||
1229 | call GNUNET\_DHT\_put from inside a helper function.} | ||
1230 | |||
1231 | |||
1232 | \subsection{Obtaining data from the DHT} | ||
1233 | As we saw in the previous example, the DHT works in an asynchronous mode. | ||
1234 | Each request to the DHT is executed ``in the background'' and the API | ||
1235 | calls return immediately. In order to receive results from the DHT, the | ||
1236 | API provides a callback. Once started, the request runs in the service, | ||
1237 | the service will try to get as many results as possible (filtering out | ||
1238 | duplicates) until the timeout expires or we explicitly stop the request. | ||
1239 | It is possible to give a ``forever'' timeout with | ||
1240 | {\tt GNUNET\_TIME\_UNIT\_FOREVER\_REL}. | ||
1241 | |||
1242 | If we give a route option {\tt GNUNET\_DHT\_RO\_RECORD\_ROUTE} the callback | ||
1243 | will get a list of all the peers the data has travelled, both on the PUT | ||
1244 | path and on the GET path. | ||
1245 | \lstset{language=C} | ||
1246 | \begin{lstlisting} | ||
1247 | static void | ||
1248 | get_result_iterator (void *cls, struct GNUNET_TIME_Absolute expiration, | ||
1249 | const struct GNUNET_HashCode *key, | ||
1250 | const struct GNUNET_PeerIdentity *get_path, | ||
1251 | unsigned int get_path_length, | ||
1252 | const struct GNUNET_PeerIdentity *put_path, | ||
1253 | unsigned int put_path_length, | ||
1254 | enum GNUNET_BLOCK_Type type, size_t size, const void *data) | ||
1255 | { | ||
1256 | // Optionally: | ||
1257 | GNUNET_DHT_get_stop (get_handle); | ||
1258 | } | ||
1259 | |||
1260 | get_handle = | ||
1261 | GNUNET_DHT_get_start (dht_handle, | ||
1262 | block_type, | ||
1263 | &key, | ||
1264 | replication, | ||
1265 | GNUNET_DHT_RO_NONE, | ||
1266 | NULL, | ||
1267 | 0, | ||
1268 | &get_result_iterator, | ||
1269 | cls) | ||
1270 | \end{lstlisting} | ||
1271 | |||
1272 | \exercise{Store a value in the DHT and after a while retrieve it. Show the IDs of all | ||
1273 | the peers the requests have gone through. In order to convert a peer ID to a string, use | ||
1274 | the function GNUNET\_i2s. Pay attention to the route option parameters in both calls!} | ||
1275 | |||
1276 | \subsection{Implementing a block plugin} | ||
1277 | |||
1278 | In order to store data in the DHT, it is necessary to provide a block | ||
1279 | plugin. The DHT uses the block plugin to ensure that only well-formed | ||
1280 | requests and replies are transmitted over the network. | ||
1281 | |||
1282 | The block plugin should be put in a file {\tt | ||
1283 | plugin\_block\_SERVICE.c} in the service's respective directory. The | ||
1284 | mandatory functions that need to be implemented for a block plugin are | ||
1285 | described in the following sections. | ||
1286 | |||
1287 | \subsubsection{Validating requests and replies} | ||
1288 | |||
1289 | The evaluate function should validate a reply or a request. It returns | ||
1290 | a {\tt GNUNET\_BLOCK\_EvaluationResult}, which is an enumeration. All | ||
1291 | possible answers are in {\tt gnunet\_block\_lib.h}. The function will | ||
1292 | be called with a {\tt reply\_block} argument of {\tt NULL} for | ||
1293 | requests. Note that depending on how {\tt evaluate} is called, only | ||
1294 | some of the possible return values are valid. The specific meaning of | ||
1295 | the {\tt xquery} argument is application-specific. Applications that | ||
1296 | do not use an extended query should check that the {\tt xquery\_size} | ||
1297 | is zero. The block group is typically used to filter duplicate | ||
1298 | replies. | ||
1299 | |||
1300 | \lstset{language=C} | ||
1301 | \begin{lstlisting} | ||
1302 | static enum GNUNET_BLOCK_EvaluationResult | ||
1303 | block_plugin_SERVICE_evaluate (void *cls, | ||
1304 | enum GNUNET_BLOCK_Type type, | ||
1305 | struct GNUNET_BlockGroup *bg, | ||
1306 | const GNUNET_HashCode *query, | ||
1307 | const void *xquery, | ||
1308 | size_t xquery_size, | ||
1309 | const void *reply_block, | ||
1310 | size_t reply_block_size) | ||
1311 | { | ||
1312 | // Verify type, block and bg | ||
1313 | } | ||
1314 | \end{lstlisting} | ||
1315 | |||
1316 | Note that it is mandatory to detect duplicate replies in this function | ||
1317 | and return the respective status code. Duplicate detection is | ||
1318 | typically done using the Bloom filter block group provided by {\tt | ||
1319 | libgnunetblockgroup.so}. Failure to do so may cause replies to | ||
1320 | circle in the network. | ||
1321 | |||
1322 | \subsubsection{Deriving a key from a reply} | ||
1323 | |||
1324 | The DHT can operate more efficiently if it is possible to derive a key | ||
1325 | from the value of the corresponding block. The {\tt get\_key} | ||
1326 | function is used to obtain the key of a block --- for example, by | ||
1327 | means of hashing. If deriving the key is not possible, the function | ||
1328 | should simply return {\tt GNUNET\_SYSERR} (the DHT will still work | ||
1329 | just fine with such blocks). | ||
1330 | |||
1331 | \lstset{language=C} | ||
1332 | \begin{lstlisting} | ||
1333 | static int | ||
1334 | block_plugin_SERVICE_get_key (void *cls, enum GNUNET_BLOCK_Type type, | ||
1335 | const void *block, size_t block_size, | ||
1336 | struct GNUNET_HashCode *key) | ||
1337 | { | ||
1338 | // Store the key in the key argument, return GNUNET_OK on success. | ||
1339 | } | ||
1340 | \end{lstlisting} | ||
1341 | |||
1342 | \subsubsection{Initialization of the plugin} | ||
1343 | |||
1344 | The plugin is realized as a shared C library. The library must export | ||
1345 | an initialization function which should initialize the plugin. The | ||
1346 | initialization function specifies what block types the plugin cares | ||
1347 | about and returns a struct with the functions that are to be used for | ||
1348 | validation and obtaining keys (the ones just defined above). | ||
1349 | |||
1350 | \lstset{language=C} | ||
1351 | \begin{lstlisting} | ||
1352 | void * | ||
1353 | libgnunet_plugin_block_SERVICE_init (void *cls) | ||
1354 | { | ||
1355 | static enum GNUNET_BLOCK_Type types[] = | ||
1356 | { | ||
1357 | GNUNET_BLOCK_TYPE_SERVICE_BLOCKYPE, | ||
1358 | GNUNET_BLOCK_TYPE_ANY | ||
1359 | }; | ||
1360 | struct GNUNET_BLOCK_PluginFunctions *api; | ||
1361 | |||
1362 | api = GNUNET_new (struct GNUNET_BLOCK_PluginFunctions); | ||
1363 | api->evaluate = &block_plugin_SERICE_evaluate; | ||
1364 | api->get_key = &block_plugin_SERVICE_get_key; | ||
1365 | api->types = types; | ||
1366 | return api; | ||
1367 | } | ||
1368 | \end{lstlisting} | ||
1369 | |||
1370 | \subsubsection{Shutdown of the plugin} | ||
1371 | |||
1372 | Following GNUnet's general plugin API concept, the plugin must | ||
1373 | export a second function for cleaning up. It usually does very | ||
1374 | little. | ||
1375 | |||
1376 | \lstset{language=C} | ||
1377 | \begin{lstlisting} | ||
1378 | void * | ||
1379 | libgnunet_plugin_block_SERVICE_done (void *cls) | ||
1380 | { | ||
1381 | struct GNUNET_TRANSPORT_PluginFunctions *api = cls; | ||
1382 | |||
1383 | GNUNET_free (api); | ||
1384 | return NULL; | ||
1385 | } | ||
1386 | \end{lstlisting} | ||
1387 | |||
1388 | |||
1389 | \subsubsection{Integration of the plugin with the build system} | ||
1390 | |||
1391 | In order to compile the plugin, the {\tt Makefile.am} file for the | ||
1392 | service \texttt{SERVICE} should contain a rule similar to this: | ||
1393 | |||
1394 | \lstset{language=make} | ||
1395 | \begin{lstlisting} | ||
1396 | plugindir = $(libdir)/gnunet | ||
1397 | |||
1398 | plugin_LTLIBRARIES = \ | ||
1399 | libgnunet_plugin_block_ext.la | ||
1400 | libgnunet_plugin_block_ext_la_SOURCES = \ | ||
1401 | plugin_block_ext.c | ||
1402 | libgnunet_plugin_block_ext_la_LIBADD = \ | ||
1403 | $(prefix)/lib/libgnunethello.la \ | ||
1404 | $(prefix)/lib/libgnunetblock.la \ | ||
1405 | $(prefix)/lib/libgnunetutil.la | ||
1406 | libgnunet_plugin_block_ext_la_LDFLAGS = \ | ||
1407 | $(GN_PLUGIN_LDFLAGS) | ||
1408 | libgnunet_plugin_block_ext_la_DEPENDENCIES = \ | ||
1409 | $(prefix)/lib/libgnunetblock.la | ||
1410 | \end{lstlisting} | ||
1411 | % $ | ||
1412 | |||
1413 | |||
1414 | \exercise{Write a block plugin that accepts all queries | ||
1415 | and all replies but prints information about queries and replies | ||
1416 | when the respective validation hooks are called.} | ||
1417 | |||
1418 | |||
1419 | |||
1420 | \subsection{Monitoring the DHT} | ||
1421 | It is possible to monitor the functioning of the local DHT service. When monitoring | ||
1422 | the DHT, the service will alert the monitoring program of any events, | ||
1423 | both started locally or received for routing from another peer. The are three different | ||
1424 | types of events possible: a GET request, a PUT request or a response (a reply to | ||
1425 | a GET). | ||
1426 | |||
1427 | Since the different events have different associated data, the API gets 3 | ||
1428 | different callbacks (one for each message type) and optional type and key parameters, | ||
1429 | to allow for filtering of messages. When an event happens, the appropiate callback | ||
1430 | is called with all the information about the event. | ||
1431 | \lstset{language=C} | ||
1432 | \begin{lstlisting} | ||
1433 | static void | ||
1434 | get_callback (void *cls, | ||
1435 | enum GNUNET_DHT_RouteOption options, | ||
1436 | enum GNUNET_BLOCK_Type type, | ||
1437 | uint32_t hop_count, | ||
1438 | uint32_t desired_replication_level, | ||
1439 | unsigned int path_length, | ||
1440 | const struct GNUNET_PeerIdentity *path, | ||
1441 | const struct GNUNET_HashCode * key) | ||
1442 | { | ||
1443 | } | ||
1444 | |||
1445 | |||
1446 | static void | ||
1447 | get_resp_callback (void *cls, | ||
1448 | enum GNUNET_BLOCK_Type type, | ||
1449 | const struct GNUNET_PeerIdentity *get_path, | ||
1450 | unsigned int get_path_length, | ||
1451 | const struct GNUNET_PeerIdentity *put_path, | ||
1452 | unsigned int put_path_length, | ||
1453 | struct GNUNET_TIME_Absolute exp, | ||
1454 | const struct GNUNET_HashCode * key, | ||
1455 | const void *data, | ||
1456 | size_t size) | ||
1457 | { | ||
1458 | } | ||
1459 | |||
1460 | |||
1461 | static void | ||
1462 | put_callback (void *cls, | ||
1463 | enum GNUNET_DHT_RouteOption options, | ||
1464 | enum GNUNET_BLOCK_Type type, | ||
1465 | uint32_t hop_count, | ||
1466 | uint32_t desired_replication_level, | ||
1467 | unsigned int path_length, | ||
1468 | const struct GNUNET_PeerIdentity *path, | ||
1469 | struct GNUNET_TIME_Absolute exp, | ||
1470 | const struct GNUNET_HashCode * key, | ||
1471 | const void *data, | ||
1472 | size_t size) | ||
1473 | { | ||
1474 | } | ||
1475 | |||
1476 | |||
1477 | monitor_handle = GNUNET_DHT_monitor_start (dht_handle, | ||
1478 | block_type, | ||
1479 | key, | ||
1480 | &get_callback, | ||
1481 | &get_resp_callback, | ||
1482 | &put_callback, | ||
1483 | cls); | ||
1484 | \end{lstlisting} | ||
1485 | |||
1486 | |||
1487 | \section{Debugging with {\tt gnunet-arm}} | ||
1488 | |||
1489 | Even if services are managed by {\tt gnunet-arm}, you can start them with | ||
1490 | {\tt gdb} or {\tt valgrind}. For example, you could add the following lines | ||
1491 | to your configuration file to start the DHT service in a {\tt gdb} session in a | ||
1492 | fresh {\tt xterm}: | ||
1493 | |||
1494 | \begin{verbatim} | ||
1495 | [dht] | ||
1496 | PREFIX=xterm -e gdb --args | ||
1497 | \end{verbatim} | ||
1498 | |||
1499 | Alternatively, you can stop a service that was started via ARM and run it manually: | ||
1500 | |||
1501 | \lstset{language=bash} | ||
1502 | \begin{lstlisting} | ||
1503 | $ gnunet-arm -k dht | ||
1504 | $ gdb --args gnunet-service-dht -L DEBUG | ||
1505 | $ valgrind gnunet-service-dht -L DEBUG | ||
1506 | \end{lstlisting} | ||
1507 | % $ | ||
1508 | |||
1509 | Assuming other services are well-written, they will automatically re-integrate the | ||
1510 | restarted service with the peer. | ||
1511 | |||
1512 | GNUnet provides a powerful logging mechanism providing log levels \texttt{ERROR}, | ||
1513 | \texttt{WARNING}, \texttt{INFO} and \texttt{DEBUG}. The current log level is | ||
1514 | configured using the \lstinline|$GNUNET_FORCE_LOG| environmental variable. | ||
1515 | The \texttt{DEBUG} level is only available if \lstinline|--enable-logging=verbose| was used when | ||
1516 | running \texttt{configure}. More details about logging can be found under | ||
1517 | \url{https://gnunet.org/logging}. | ||
1518 | |||
1519 | You should also probably enable the creation of core files, by setting | ||
1520 | {\tt ulimit}, and echo'ing 1 into {\tt /proc/sys/kernel/core\_uses\_pid}. | ||
1521 | Then you can investigate the core dumps with {\tt gdb}, which is often | ||
1522 | the fastest method to find simple errors. | ||
1523 | |||
1524 | \exercise{Add a memory leak to your service and obtain a trace | ||
1525 | pointing to the leak using {\tt valgrind} while running the service | ||
1526 | from {\tt gnunet-service-arm}.} | ||
1527 | |||
1528 | |||
1529 | \end{document} | ||
diff --git a/doc/gnunet-c-tutorial.texi b/doc/gnunet-c-tutorial.texi new file mode 100644 index 000000000..4f56ae5c4 --- /dev/null +++ b/doc/gnunet-c-tutorial.texi | |||
@@ -0,0 +1,1181 @@ | |||
1 | \input texinfo | ||
2 | @c %**start of header | ||
3 | @setfilename gnunet-c-tutorial.info | ||
4 | @documentencoding UTF-8 | ||
5 | @settitle GNUnet C Tutorial | ||
6 | @c %**end of header | ||
7 | |||
8 | @copying | ||
9 | Copyright @copyright{} 2001-2017 GNUnet e.V. | ||
10 | |||
11 | Permission is granted to copy, distribute and/or modify this document | ||
12 | under the terms of the GNU Free Documentation License, Version 1.3 or | ||
13 | any later version published by the Free Software Foundation; with no | ||
14 | Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A | ||
15 | copy of the license is included in the section entitled ``GNU Free | ||
16 | Documentation License''. | ||
17 | |||
18 | A copy of the license is also available from the Free Software | ||
19 | Foundation Web site at @url{http://www.gnu.org/licenses/fdl.html}. | ||
20 | |||
21 | Alternately, this document is also available under the General | ||
22 | Public License, version 3 or later, as published by the Free Software | ||
23 | Foundation. A copy of the license is included in the section entitled | ||
24 | ``GNU General Public License''. | ||
25 | |||
26 | A copy of the license is also available from the Free Software | ||
27 | Foundation Web site at @url{http://www.gnu.org/licenses/gpl.html}. | ||
28 | @end copying | ||
29 | |||
30 | @titlepage | ||
31 | @title GNUnet C Tutorial | ||
32 | @subtitle A Tutorial for GNUnet 0.10.x (C version) | ||
33 | @author The GNUnet Developers | ||
34 | |||
35 | @page | ||
36 | @vskip 0pt plus 1filll | ||
37 | |||
38 | @insertcopying | ||
39 | @end titlepage | ||
40 | |||
41 | @contents | ||
42 | |||
43 | @c **** TODO | ||
44 | @c 1. Update content? | ||
45 | @c 2. Either reference main documentation or | ||
46 | @c 3. Merge this into main documentation | ||
47 | |||
48 | @node Top | ||
49 | @top Introduction | ||
50 | |||
51 | This tutorials explains how to install GNUnet on a GNU/Linux system and gives an introduction on how | ||
52 | GNUnet can be used to develop a Peer-to-Peer application. Detailed installation instructions for | ||
53 | various operating systems and a detailed list of all dependencies can be found on our website at | ||
54 | @uref{https://gnunet.org/installation}. | ||
55 | |||
56 | Please read this tutorial carefully since every single step is | ||
57 | important and do not hesitate to contact the GNUnet team if you have | ||
58 | any questions or problems! Check here how to contact the GNUnet | ||
59 | team: @uref{https://gnunet.org/contact_information} | ||
60 | |||
61 | @node Installing GNUnet | ||
62 | @chapter Installing GNUnet | ||
63 | |||
64 | First of all you have to install a current version of GNUnet. You can download a | ||
65 | tarball of a stable version from GNU FTP mirrors or obtain the latest development | ||
66 | version from our Git repository. | ||
67 | |||
68 | Most of the time you should prefer to download the stable version since with the | ||
69 | latest development version things can be broken, functionality can be changed or tests | ||
70 | can fail. You should only use the development version if you know that you require a | ||
71 | certain feature or a certain issue has been fixed since the last release. | ||
72 | |||
73 | @node Obtaining a stable version | ||
74 | @section Obtaining a stable version | ||
75 | |||
76 | You can download the latest stable version of GNUnet from GNU FTP mirrors: | ||
77 | @uref{https://ftp.gnu.org/gnu/gnunet/gnunet-0.10.x.tar.gz} | ||
78 | You should also download the signature file and verify the integrity of the tarball. | ||
79 | @uref{https://ftp.gnu.org/gnu/gnunet/gnunet-0.10.x.tar.gz.sig} | ||
80 | To verify the signature you should first import the GPG key used to sign the tarball | ||
81 | @example | ||
82 | $ gpg --keyserver keys.gnupg.net --recv-keys 48426C7E | ||
83 | @end example | ||
84 | And use this key to verify the tarball's signature | ||
85 | @example | ||
86 | $ gpg --verify gnunet-0.10.x.tar.gz.sig gnunet-0.10.x.tar.gz | ||
87 | @end example | ||
88 | After successfully verifying the integrity you can extract the tarball using | ||
89 | @example | ||
90 | $ tar xvzf gnunet-0.10.x.tar.gz | ||
91 | ## we will use the directory "gnunet" in the remainder of this document | ||
92 | $ mv gnunet-0.10.x gnunet | ||
93 | $ cd gnunet | ||
94 | @end example | ||
95 | |||
96 | However, please note that stable versions can be very outdated, as a developer | ||
97 | you are strongly encouraged to use the version from @uref{https://gnunet.org/git/}. | ||
98 | |||
99 | @node Installing Build Tool Chain and Dependencies | ||
100 | @section Installing Build Tool Chain and Dependencies | ||
101 | |||
102 | To successfully compile GNUnet you need the tools to build GNUnet and the required dependencies. | ||
103 | Please have a look at @uref{https://gnunet.org/dependencies} for a list of required dependencies | ||
104 | and @uref{https://gnunet.org/generic_installation} for specific instructions for your operating system. | ||
105 | |||
106 | Please check the notes at the end of the configure process about required dependencies. | ||
107 | |||
108 | For GNUnet bootstrapping support and the http(s) plugin you should install libgnurl. | ||
109 | For the filesharing service you should install at least one of the datastore backends mysql, | ||
110 | sqlite or postgresql. | ||
111 | |||
112 | @node Obtaining the latest version from Git | ||
113 | @section Obtaining the latest version from Git | ||
114 | |||
115 | The latest development version can obtained from our Git repository. To obtain | ||
116 | the code you need Git installed and checkout the repository using: | ||
117 | @example | ||
118 | $ git clone https://gnunet.org/git/gnunet | ||
119 | @end example | ||
120 | After cloning the repository you have to execute | ||
121 | @example | ||
122 | $ cd gnunet | ||
123 | $ ./bootstrap | ||
124 | @end example | ||
125 | |||
126 | The remainder of this tutorial assumes that you have Git branch ``master'' checked out. | ||
127 | |||
128 | @node Compiling and Installing GNUnet | ||
129 | @section Compiling and Installing GNUnet | ||
130 | |||
131 | First, you need to install at least libgnupgerror version 1.27 | ||
132 | @uref{https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.27.tar.bz2} | ||
133 | and libgcrypt version 1.7.6 @uref{https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.7.6.tar.bz2}. | ||
134 | |||
135 | @example | ||
136 | $ wget https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.27.tar.bz2 | ||
137 | $ tar xf libgpg-error-1.27.tar.bz2 | ||
138 | $ cd libgpg-error-1.27 | ||
139 | $ ./configure | ||
140 | $ sudo make install | ||
141 | $ cd .. | ||
142 | @end example | ||
143 | |||
144 | @example | ||
145 | $ wget https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.7.6.tar.bz2 | ||
146 | $ tar xf libgcrypt-1.7.6.tar.bz2 | ||
147 | $ cd libgcrypt-1.7.6 | ||
148 | $ ./configure | ||
149 | $ sudo make install | ||
150 | $ cd .. | ||
151 | @end example | ||
152 | |||
153 | @node Installation | ||
154 | @subsection Installation | ||
155 | Assuming all dependencies are installed, the following commands will | ||
156 | compile and install GNUnet in your home directory. You can specify the | ||
157 | directory where GNUnet will be installed by changing the | ||
158 | @code{--prefix} value when calling @command{./configure}. If | ||
159 | you do not specifiy a prefix, GNUnet is installed in the directory | ||
160 | @file{/usr/local}. When developing new applications you may want | ||
161 | to enable verbose logging by adding @code{--enable-logging=verbose}: | ||
162 | |||
163 | @example | ||
164 | $ ./configure --prefix=$PREFIX --enable-logging | ||
165 | $ make | ||
166 | $ make install | ||
167 | @end example | ||
168 | |||
169 | After installing GNUnet you have to add your GNUnet installation to your path | ||
170 | environmental variable. In addition you have to create the @file{.config} | ||
171 | directory in your home directory (unless it already exists) where GNUnet stores | ||
172 | its data and an empty GNUnet configuration file: | ||
173 | |||
174 | @example | ||
175 | $ export PATH=$PATH:$PREFIX/bin | ||
176 | $ echo export PATH=$PREFIX/bin:\\$PATH >> ~/.bashrc | ||
177 | $ mkdir ~/.config/ | ||
178 | $ touch ~/.config/gnunet.conf | ||
179 | @end example | ||
180 | |||
181 | @node Common Issues - Check your GNUnet installation | ||
182 | @section Common Issues - Check your GNUnet installation | ||
183 | |||
184 | You should check your installation to ensure that installing GNUnet | ||
185 | was successful up to this point. You should be able to access GNUnet's | ||
186 | binaries and run GNUnet's self check. | ||
187 | @example | ||
188 | $ which gnunet-arm | ||
189 | @end example | ||
190 | should return $PREFIX/bin/gnunet-arm. It should be | ||
191 | located in your GNUnet installation and the output should not be | ||
192 | empty. If you see an output like: | ||
193 | @example | ||
194 | $ which gnunet-arm | ||
195 | @end example | ||
196 | check your PATH variable to ensure GNUnet's @file{bin} directory is included. | ||
197 | |||
198 | GNUnet provides tests for all of its subcomponents. Run | ||
199 | @example | ||
200 | $ make check | ||
201 | @end example | ||
202 | to execute tests for all components. make check traverses all subdirectories in src. | ||
203 | For every subdirectory you should get a message like this: | ||
204 | |||
205 | @example | ||
206 | make[2]: Entering directory `/home/$USER/gnunet/contrib' | ||
207 | PASS: test_gnunet_prefix | ||
208 | ============= | ||
209 | 1 test passed | ||
210 | ============= | ||
211 | @end example | ||
212 | |||
213 | @node Background: GNUnet Architecture | ||
214 | @chapter Background: GNUnet Architecture | ||
215 | |||
216 | GNUnet is organized in layers and services. Each service is composed of a | ||
217 | main service implementation and a client library for other programs to use | ||
218 | the service's functionality, described by an API. This approach is shown in | ||
219 | @c** FIXME: enable this once the commented block below works: | ||
220 | @c** figure~\ref{fig:service}. | ||
221 | Some services provide an additional command line tool to enable the user to | ||
222 | interact with the service. | ||
223 | |||
224 | Very often it is other GNUnet services that will use these APIs to build the | ||
225 | higher layers of GNUnet on top of the lower ones. Each layer expands or extends | ||
226 | the functionality of the service below (for instance, to build a mesh on top of | ||
227 | a DHT). | ||
228 | @c** FXIME: See comment above. | ||
229 | @c** See figure ~\ref{fig:interaction} for an illustration of this approach. | ||
230 | |||
231 | @c ** @image{filename[, width[, height[, alttext[, extension]]]]} | ||
232 | |||
233 | @image{images/gnunet-tutorial-service,,5in,Service with API and network protocol,.png} | ||
234 | |||
235 | @image{images/gnunet-tutorial-system,,5in,The layered system architecture of GNUnet,.png} | ||
236 | |||
237 | @c \begin{figure}[!h] | ||
238 | @c \begin{center} | ||
239 | @c % \begin{subfigure} | ||
240 | @c \begin{subfigure}[b]{0.3\textwidth} | ||
241 | @c \centering | ||
242 | @c \includegraphics[width=\textwidth]{figs/Service.pdf} | ||
243 | @c \caption{Service with API and network protocol} | ||
244 | @c \label{fig:service} | ||
245 | @c \end{subfigure} | ||
246 | @c ~~~~~~~~~~ | ||
247 | @c \begin{subfigure}[b]{0.3\textwidth} | ||
248 | @c \centering | ||
249 | @c \includegraphics[width=\textwidth]{figs/System.pdf} | ||
250 | @c \caption{Service interaction} | ||
251 | @c \label{fig:interaction} | ||
252 | @c \end{subfigure} | ||
253 | @c \end{center} | ||
254 | @c \caption{GNUnet's layered system architecture} | ||
255 | @c \end{figure} | ||
256 | |||
257 | The main service implementation runs as a standalone process in the operating | ||
258 | system and the client code runs as part of the client program, so crashes of a | ||
259 | client do not affect the service process or other clients. The service and the | ||
260 | clients communicate via a message protocol to be defined and implemented by | ||
261 | the programmer. | ||
262 | |||
263 | @node First Steps with GNUnet | ||
264 | @chapter First Steps with GNUnet | ||
265 | |||
266 | @node Configure your peer | ||
267 | @section Configure your peer | ||
268 | |||
269 | First of all we need to configure your peer. Each peer is started with a configuration | ||
270 | containing settings for GNUnet itself and its services. This configuration is based on the | ||
271 | default configuration shipped with GNUnet and can be modified. The default configuration | ||
272 | is located in the @file{$PREFIX/share/gnunet/config.d} directory. When starting a peer, you | ||
273 | can specify a customized configuration using the the @command{-c} command line switch when | ||
274 | starting the ARM service and all other services. When using a modified configuration the | ||
275 | default values are loaded and only values specified in the configuration file will replace | ||
276 | the default values. | ||
277 | |||
278 | Since we want to start additional peers later, we need some modifications from the default | ||
279 | configuration. We need to create a separate service home and a file containing our | ||
280 | modifications for this peer: | ||
281 | @example | ||
282 | $ mkdir ~/gnunet1/ | ||
283 | $ touch peer1.conf | ||
284 | @end example | ||
285 | |||
286 | Now add the following lines to @file{peer1.conf} to use this directory. For | ||
287 | simplified usage we want to prevent the peer to connect to the GNUnet | ||
288 | network since this could lead to confusing output. This modifications | ||
289 | will replace the default settings: | ||
290 | @example | ||
291 | [PATHS] | ||
292 | GNUNET_HOME = ~/gnunet1/ # Use this directory to store GNUnet data | ||
293 | [hostlist] | ||
294 | SERVERS = # prevent bootstrapping | ||
295 | @end example | ||
296 | |||
297 | @node Start a peer | ||
298 | @section Start a peer | ||
299 | Each GNUnet instance (called peer) has an identity (peer ID) based on a | ||
300 | cryptographic public private key pair. The peer ID is the printable hash of the | ||
301 | public key. | ||
302 | |||
303 | GNUnet services are controlled by a master service, the so called @dfn{Automatic Restart Manager} (ARM). | ||
304 | ARM starts, stops and even restarts services automatically or on demand when a client connects. | ||
305 | You interact with the ARM service using the gnunet-arm tool. | ||
306 | GNUnet can then be started with @command{gnunet-arm -s} and stopped with | ||
307 | @command{gnunet-arm -e}. An additional service not automatically started | ||
308 | can be started using @command{gnunet-arm -i <service name>} and stopped | ||
309 | using @command{gnunet-arm -k <servicename>}. | ||
310 | |||
311 | Once you have started your peer, you can use many other GNUnet commands | ||
312 | to interact with it. For example, you can run: | ||
313 | @example | ||
314 | $ gnunet-peerinfo -s | ||
315 | @end example | ||
316 | to obtain the public key of your peer. | ||
317 | You should see an output containing the peer ID similar to: | ||
318 | @example | ||
319 | I am peer `0PA02UVRKQTS2C .. JL5Q78F6H0B1ACPV1CJI59MEQUMQCC5G'. | ||
320 | @end example | ||
321 | |||
322 | @node Monitor a peer | ||
323 | @section Monitor a peer | ||
324 | |||
325 | In this section, we will monitor the behaviour of our peer's DHT service with respect to a | ||
326 | specific key. First we will start GNUnet and then start the DHT service and use the DHT monitor tool | ||
327 | to monitor the PUT and GET commands we issue ussing the @command{gnunet-dht-put} and | ||
328 | @command{gnunet-dht-get} commands. Using the ``monitor'' line given below, you can observe | ||
329 | the behavior of your own peer's DHT with respect to the specified KEY: | ||
330 | |||
331 | @example | ||
332 | $ gnunet-arm -c ~/peer1.conf -s # start gnunet with all default services | ||
333 | $ gnunet-arm -c ~/peer1.conf -i dht # start DHT service | ||
334 | $ cd ~/gnunet/src/dht; | ||
335 | $ ./gnunet-dht-monitor -c ~/peer1.conf -k KEY | ||
336 | @end example | ||
337 | Now open a separate terminal and change again to the @file{gnunet/src/dht} directory: | ||
338 | @example | ||
339 | $ cd ~/gnunet/src/dht | ||
340 | $ ./gnunet-dht-put -c ~/peer1.conf -k KEY -d VALUE # put VALUE under KEY in the DHT | ||
341 | $ ./gnunet/src/dht/gnunet-dht-get -c ~/peer1.conf -k KEY # get key KEY from the DHT | ||
342 | $ gnunet-statistics -c ~/peer1.conf # print statistics about current GNUnet state | ||
343 | $ gnunet-statistics -c ~/peer1.conf -s dht # print statistics about DHT service | ||
344 | @end example | ||
345 | |||
346 | @node Starting Two Peers by Hand | ||
347 | @section Starting Two Peers by Hand | ||
348 | |||
349 | This section describes how to start two peers on the same machine by hand. | ||
350 | The process is rather painful, but the description is somewhat instructive. | ||
351 | In practice, you might prefer the automated method | ||
352 | (@pxref{Starting Peers Using the Testbed Service}). | ||
353 | |||
354 | @node Setup a second peer | ||
355 | @subsection Setup a second peer | ||
356 | We will now start a second peer on your machine. | ||
357 | For the second peer, you will need to manually create a modified | ||
358 | configuration file to avoid conflicts with ports and directories. | ||
359 | A peers configuration file is by default located in @file{~/.gnunet/gnunet.conf}. | ||
360 | This file is typically very short or even empty as only the differences to the | ||
361 | defaults need to be specified. The defaults are located in | ||
362 | many files in the @file{$PREFIX/share/gnunet/config.d} directory. | ||
363 | |||
364 | To configure the second peer, use the files | ||
365 | @file{$PREFIX/share/gnunet/config.d} as a template for your main | ||
366 | configuration file: | ||
367 | @example | ||
368 | $ cat $PREFIX/share/gnunet/config.d/*.conf > peer2.conf | ||
369 | @end example | ||
370 | Now you have to edit @file{peer2.conf} and change: | ||
371 | @itemize | ||
372 | @item @code{GNUNET\_TEST\_HOME} under @code{PATHS} | ||
373 | @item Every (uncommented) value for ``@code{PORT}'' (add 10000) in any | ||
374 | section (the option may be commented out if @code{PORT} is | ||
375 | prefixed by "\#", in this case, UNIX domain sockets are used | ||
376 | and the PORT option does not need to be touched) | ||
377 | @item Every value for ``@code{UNIXPATH}'' in any section (e.g. by adding a "-p2" suffix) | ||
378 | @end itemize | ||
379 | to a fresh, unique value. Make sure that the PORT numbers stay below 65536. | ||
380 | From now on, whenever you interact with the second peer, you need to specify | ||
381 | @command{-c peer2.conf} as an additional command line argument. | ||
382 | |||
383 | Now, generate the 2nd peer's private key: | ||
384 | |||
385 | @example | ||
386 | $ gnunet-peerinfo -s -c peer2.conf | ||
387 | @end example | ||
388 | |||
389 | This may take a while, generate entropy using your keyboard or mouse | ||
390 | as needed. Also, make sure the output is different from the | ||
391 | gnunet-peerinfo output for the first peer (otherwise you made an | ||
392 | error in the configuration). | ||
393 | |||
394 | @node Start the second peer and connect the peers | ||
395 | @subsection Start the second peer and connect the peers | ||
396 | |||
397 | Then, you can start a second peer using: | ||
398 | @example | ||
399 | $ gnunet-arm -c peer2.conf -s | ||
400 | $ gnunet-arm -c peer2.conf -i dht | ||
401 | $ ~/gnunet/src/dht/gnunet-dht-put -c peer2.conf -k KEY -d VALUE | ||
402 | $ ~/gnunet/src/dht/gnunet-dht-get -c peer2.conf -k KEY | ||
403 | @end example | ||
404 | If you want the two peers to connect, you have multiple options: | ||
405 | @itemize | ||
406 | @item UDP neighbour discovery (automatic) | ||
407 | @item Setup a bootstrap server | ||
408 | @item Connect manually | ||
409 | @end itemize | ||
410 | To setup peer 1 as bootstrapping server change the configuration of | ||
411 | the first one to be a hostlist server by adding the following lines to | ||
412 | @file{peer1.conf} to enable bootstrapping server: | ||
413 | @example | ||
414 | [hostlist] | ||
415 | OPTIONS = -p | ||
416 | @end example | ||
417 | |||
418 | Then change @file{peer2.conf} and replace the ``@code{SERVERS}'' line in the ``@code{[hostlist]}'' section with | ||
419 | ``@code{http://localhost:8080/}''. Restart both peers using: | ||
420 | @example | ||
421 | $ gnunet-arm -c peer1.conf -e # stop first peer | ||
422 | $ gnunet-arm -c peer1.conf -s # start first peer | ||
423 | $ gnunet-arm -c peer2.conf -s # start second peer | ||
424 | @end example | ||
425 | |||
426 | Note that if you start your peers without changing these settings, they | ||
427 | will use the ``global'' hostlist servers of the GNUnet P2P network and | ||
428 | likely connect to those peers. At that point, debugging might become | ||
429 | tricky as you're going to be connected to many more peers and would | ||
430 | likely observe traffic and behaviors that are not explicitly controlled | ||
431 | by you. | ||
432 | |||
433 | @node How to connect manually | ||
434 | @subsection How to connect manually | ||
435 | |||
436 | If you want to use the @code{peerinfo} tool to connect your peers, you should: | ||
437 | @itemize | ||
438 | @item Set @code{FORCESTART = NO} in section @code{hostlist} (to not connect to the global GNUnet) | ||
439 | @item Start both peers running @command{gnunet-arm -c peer1.conf -s} and @command{gnunet-arm -c peer2.conf -s} | ||
440 | @item Get @code{HELLO} message of the first peer running @command{gnunet-peerinfo -c peer1.conf -g} | ||
441 | @item Give the output to the second peer by running @command{gnunet-peerinfo -c peer2.conf -p '<output>'} | ||
442 | @end itemize | ||
443 | |||
444 | Check that they are connected using @command{gnunet-core -c peer1.conf}, | ||
445 | which should give you the other peer's peer identity: | ||
446 | @example | ||
447 | $ gnunet-core -c peer1.conf | ||
448 | Peer `9TVUCS8P5A7ILLBGO6 [...shortened...] 1KNBJ4NGCHP3JPVULDG' | ||
449 | @end example | ||
450 | |||
451 | @node Starting Peers Using the Testbed Service | ||
452 | @section Starting Peers Using the Testbed Service | ||
453 | @c \label{sec:testbed} | ||
454 | |||
455 | GNUnet's testbed service is used for testing scenarios where a number of peers | ||
456 | are to be started. The testbed can manage peers on a single host or on multiple | ||
457 | hosts in a distributed fashion. On a single affordable computer, it should be | ||
458 | possible to run around tens of peers without drastically increasing the load on the | ||
459 | system. | ||
460 | |||
461 | The testbed service can be access through its API | ||
462 | @file{include/gnunet\_testbed\_service.h}. The API provides many routines for | ||
463 | managing a group of peers. It also provides a helper function | ||
464 | @code{GNUNET\_TESTBED\_test\_run()} to quickly setup a minimalistic testing | ||
465 | environment on a single host. | ||
466 | |||
467 | This function takes a configuration file which will be used as a template | ||
468 | configuration for the peers. The testbed takes care of modifying relevant | ||
469 | options in the peers' configuration such as @code{SERVICEHOME}, @code{PORT}, @code{UNIXPATH} to | ||
470 | unique values so that peers run without running into conflicts. It also checks | ||
471 | and assigns the ports in configurations only if they are free. | ||
472 | |||
473 | Additionally, the testbed service also reads its options from the same | ||
474 | configuration file. Various available options and details about them can be | ||
475 | found in the testbed default configuration file @file{src/testbed/testbed.conf}. | ||
476 | |||
477 | With the testbed API, a sample test case can be structured as follows: | ||
478 | @example | ||
479 | @verbatiminclude testbed_test.c | ||
480 | @end example | ||
481 | The source code for the above listing can be found at | ||
482 | @uref{https://gnunet.org/git/gnunet.git/tree/doc/testbed_test.c} | ||
483 | or in the @file{doc/} folder of your repository check-out. | ||
484 | After installing GNUnet, the above source code can be compiled as: | ||
485 | @example | ||
486 | $ export CPPFLAGS="-I/path/to/gnunet/headers" | ||
487 | $ export LDFLAGS="-L/path/to/gnunet/libraries" | ||
488 | $ gcc $CPPFLAGS $LDFLAGS -o testbed-test testbed_test.c -lgnunettestbed -lgnunetdht -lgnunetutil | ||
489 | $ touch template.conf # Generate (empty) configuration | ||
490 | $ ./testbed-test # run it (press CTRL-C to stop) | ||
491 | @end example | ||
492 | The @code{CPPFLAGS} and @code{LDFLAGS} are necessary if GNUnet is installed | ||
493 | into a different directory other than @file{/usr/local}. | ||
494 | |||
495 | All of testbed API's peer management functions treat management actions as | ||
496 | operations and return operation handles. It is expected that the operations | ||
497 | begin immediately, but they may get delayed (to balance out load on the system). | ||
498 | The program using the API then has to take care of marking the operation as | ||
499 | ``done'' so that its associated resources can be freed immediately and other | ||
500 | waiting operations can be executed. Operations will be canceled if they are | ||
501 | marked as ``done'' before their completion. | ||
502 | |||
503 | An operation is treated as completed when it succeeds or fails. Completion of | ||
504 | an operation is either conveyed as events through @i{controller event callback} | ||
505 | or through respective operation completion callbacks. In functions | ||
506 | which support completion notification through both controller event callback and | ||
507 | operation completion callback, first the controller event callback will be | ||
508 | called. If the operation is not marked as done in that callback or if the | ||
509 | callback is given as NULL when creating the operation, the operation completion | ||
510 | callback will be called. The API documentation shows which event are to be | ||
511 | expected in the controller event notifications. It also documents any | ||
512 | exceptional behaviour. | ||
513 | |||
514 | Once the peers are started, test cases often need to connect some of the peers' | ||
515 | services. Normally, opening a connect to a peer's service requires the peer's | ||
516 | configuration. While using testbed, the testbed automatically generates | ||
517 | per-peer configuration. Accessing those configurations directly through file | ||
518 | system is discouraged as their locations are dynamically created and will be | ||
519 | different among various runs of testbed. To make access to these configurations | ||
520 | easy, testbed API provides the function | ||
521 | @code{GNUNET\_TESTBED\_service\_connect()}. This function fetches the | ||
522 | configuration of a given peer and calls the @i{Connect Adapter}. | ||
523 | In the example code, it is the @code{dht\_ca}. A connect adapter is expected | ||
524 | to open the connection to the needed service by using the provided configuration | ||
525 | and return the created service connection handle. Successful connection to the | ||
526 | needed service is signaled through @code{service\_connect\_comp\_cb}. | ||
527 | |||
528 | A dual to connect adapter is the @i{Disconnect Adapter}. This callback is | ||
529 | called after the connect adapter has been called when the operation from | ||
530 | @code{GNUNET\_TESTBED\_service\_connect()} is marked as ``done''. It has to | ||
531 | disconnect from the service with the provided service handle (@code{op\_result}). | ||
532 | |||
533 | Exercise: Find out how many peers you can run on your system. | ||
534 | |||
535 | Exercise: Find out how to create a 2D torus topology by changing the | ||
536 | options in the configuration file. See @uref{https://gnunet.org/supported-topologies} | ||
537 | Then use the DHT API to store and retrieve values in the | ||
538 | network. | ||
539 | |||
540 | @node Developing Applications | ||
541 | @chapter Developing Applications | ||
542 | |||
543 | @node gnunet-ext | ||
544 | @section gnunet-ext | ||
545 | To develop a new peer-to-peer application or to extend GNUnet we provide | ||
546 | a template build system for writing GNUnet extensions in C. It can be | ||
547 | obtained as follows: | ||
548 | |||
549 | @example | ||
550 | $ git clone https://gnunet.org/git/gnunet-ext | ||
551 | $ cd gnunet-ext/ | ||
552 | $ ./bootstrap | ||
553 | $ ./configure --prefix=$PREFIX --with-gnunet=$PREFIX | ||
554 | $ make | ||
555 | $ make install | ||
556 | $ make check | ||
557 | @end example | ||
558 | |||
559 | The GNUnet ext template includes examples and a working buildsystem for a new GNUnet service. | ||
560 | A common GNUnet service consists of the following parts which will be discussed in detail in the | ||
561 | remainder of this document. The functionality of a GNUnet service is implemented in: | ||
562 | |||
563 | @itemize | ||
564 | @item the GNUnet service (gnunet-ext/src/ext/gnunet-service-ext.c) | ||
565 | @item the client API (gnunet-ext/src/ext/ext_api.c) | ||
566 | @item the client application using the service API (gnunet-ext/src/ext/gnunet-ext.c) | ||
567 | @end itemize | ||
568 | |||
569 | The interfaces for these entities are defined in: | ||
570 | @itemize | ||
571 | @item client API interface (gnunet-ext/src/ext/ext.h) | ||
572 | @item the service interface (gnunet-ext/src/include/gnunet_service_SERVICE.h) | ||
573 | @item the P2P protocol (gnunet-ext/src/include/gnunet_protocols_ext.h) | ||
574 | @end itemize | ||
575 | |||
576 | |||
577 | In addition the ext systems provides: | ||
578 | @itemize | ||
579 | @item a test testing the API (gnunet-ext/src/ext/test_ext_api.c) | ||
580 | @item a configuration template for the service (gnunet-ext/src/ext/ext.conf.in) | ||
581 | @end itemize | ||
582 | |||
583 | @node Adapting the Template | ||
584 | @section Adapting the Template | ||
585 | |||
586 | The first step for writing any extension with a new service is to | ||
587 | ensure that the @file{ext.conf.in} file contains entries for the | ||
588 | @code{UNIXPATH}, @code{PORT} and @code{BINARY} for the service in a section named after | ||
589 | the service. | ||
590 | |||
591 | If you want to adapt the template rename the @file{ext.conf.in} to match your | ||
592 | services name, you have to modify the @code{AC\_OUTPUT} section in @file{configure.ac} | ||
593 | in the @file{gnunet-ext} root. | ||
594 | |||
595 | @node Writing a Client Application | ||
596 | @section Writing a Client Application | ||
597 | |||
598 | When writing any client application (for example, a command-line | ||
599 | tool), the basic structure is to start with the @code{GNUNET\_PROGRAM\_run} | ||
600 | function. This function will parse command-line options, setup the scheduler | ||
601 | and then invoke the @code{run} function (with the remaining non-option arguments) | ||
602 | and a handle to the parsed configuration (and the configuration file name that was | ||
603 | used, which is typically not needed): | ||
604 | @example | ||
605 | @verbatiminclude tutorial-examples/001.c | ||
606 | @end example | ||
607 | |||
608 | @node Handling command-line options | ||
609 | @subsection Handling command-line options | ||
610 | |||
611 | Options can then be added easily by adding global variables and | ||
612 | expanding the @code{options} array. For example, the following would | ||
613 | add a string-option and a binary flag (defaulting to @code{NULL} and | ||
614 | @code{GNUNET\_NO} respectively): | ||
615 | @example | ||
616 | @verbatiminclude tutorial-examples/002.c | ||
617 | @end example | ||
618 | |||
619 | Issues such as displaying some helpful text describing options using | ||
620 | the @code{--help} argument and error handling are taken care of when | ||
621 | using this approach. Other @code{GNUNET\_GETOPT\_}-functions can be used | ||
622 | to obtain integer value options, increment counters, etc. You can | ||
623 | even write custom option parsers for special circumstances not covered | ||
624 | by the available handlers. To check if an argument was specified by the | ||
625 | user you initialize the variable with a specific value (e.g. NULL for | ||
626 | a string and GNUNET\_SYSERR for a integer) and check after parsing | ||
627 | happened if the values were modified. | ||
628 | |||
629 | Inside the @code{run} method, the program would perform the | ||
630 | application-specific logic, which typically involves initializing and | ||
631 | using some client library to interact with the service. The client | ||
632 | library is supposed to implement the IPC whereas the service provides | ||
633 | more persistent P2P functions. | ||
634 | |||
635 | Exercise: Add a few command-line options and print them inside | ||
636 | of @code{run}. What happens if the user gives invalid arguments? | ||
637 | |||
638 | @node Writing a Client Library | ||
639 | @subsection Writing a Client Library | ||
640 | |||
641 | The first and most important step in writing a client library is to | ||
642 | decide on an API for the library. Typical API calls include | ||
643 | connecting to the service, performing application-specific requests | ||
644 | and cleaning up. Many examples for such service APIs can be found | ||
645 | in the @file{gnunet/src/include/gnunet\_*\_service.h} files. | ||
646 | |||
647 | Then, a client-service protocol needs to be designed. This typically | ||
648 | involves defining various message formats in a header that will be | ||
649 | included by both the service and the client library (but is otherwise | ||
650 | not shared and hence located within the service's directory and not | ||
651 | installed by @command{make install}). Each message must start with a | ||
652 | @code{struct GNUNET\_MessageHeader} and must be shorter than 64k. By | ||
653 | convention, all fields in IPC (and P2P) messages must be in big-endian | ||
654 | format (and thus should be read using @code{ntohl} and similar | ||
655 | functions and written using @code{htonl} and similar functions). | ||
656 | Unique message types must be defined for each message struct in the | ||
657 | @file{gnunet\_protocols.h} header (or an extension-specific include | ||
658 | file). | ||
659 | |||
660 | @node Connecting to the Service | ||
661 | @subsubsection Connecting to the Service | ||
662 | |||
663 | Before a client library can implement the application-specific protocol | ||
664 | with the service, a connection must be created: | ||
665 | @example | ||
666 | @verbatiminclude tutorial-examples/003.c | ||
667 | @end example | ||
668 | |||
669 | As a result a @code{GNUNET\_MQ\_Handle} is returned | ||
670 | which can to used henceforth to transmit messages to the service. | ||
671 | The complete MQ API can be found in @file{gnunet\_mq\_lib.h}. | ||
672 | The @code{hanlders} array in the example above is incomplete. | ||
673 | Here is where you will define which messages you expect to | ||
674 | receive from the service, and which functions handle them. | ||
675 | The @code{error\_cb} is a function that is to be called whenever | ||
676 | there are errors communicating with the service. | ||
677 | |||
678 | @node Sending messages | ||
679 | @subsubsection Sending messages | ||
680 | |||
681 | In GNUnet, messages are always sent beginning with a @code{struct GNUNET\_MessageHeader} | ||
682 | in big endian format. This header defines the size and the type of the | ||
683 | message, the payload follows after this header. | ||
684 | @example | ||
685 | @verbatiminclude tutorial-examples/004.c | ||
686 | @end example | ||
687 | |||
688 | Existing message types are defined in @file{gnunet\_protocols.h}. | ||
689 | A common way to create a message is with an envelope: | ||
690 | @example | ||
691 | @verbatiminclude tutorial-examples/005.c | ||
692 | @end example | ||
693 | |||
694 | Exercise: Define a message struct that includes a 32-bit | ||
695 | unsigned integer in addition to the standard GNUnet MessageHeader. | ||
696 | Add a C struct and define a fresh protocol number for your message. | ||
697 | Protocol numbers in gnunet-ext are defined in @file{gnunet-ext/src/include/gnunet_protocols_ext.h} | ||
698 | |||
699 | Exercise: Find out how you can determine the number of messages in a message queue. | ||
700 | |||
701 | Exercise: Find out how you can determine when a message you have queued was actually transmitted. | ||
702 | |||
703 | Exercise: Define a helper function to transmit a 32-bit | ||
704 | unsigned integer (as payload) to a service using some given client | ||
705 | handle. | ||
706 | |||
707 | @node Receiving Replies from the Service | ||
708 | @subsubsection Receiving Replies from the Service | ||
709 | |||
710 | Clients can receive messages from the service using the handlers | ||
711 | specified in the @code{handlers} array we specified when connecting | ||
712 | to the service. Entries in the the array are usually created using | ||
713 | one of two macros, depending on whether the message is fixed size | ||
714 | or variable size. Variable size messages are managed using two | ||
715 | callbacks, one to check that the message is well-formed, the other | ||
716 | to actually process the message. Fixed size messages are fully | ||
717 | checked by the MQ-logic, and thus only need to provide the handler | ||
718 | to process the message. Note that the prefixes @code{check\_} | ||
719 | and @code{handle\_} are mandatory. | ||
720 | @example | ||
721 | @verbatiminclude tutorial-examples/006.c | ||
722 | @end example | ||
723 | |||
724 | Exercise: Expand your helper function to receive a response message | ||
725 | (for example, containing just the @code{struct GNUnet MessageHeader} | ||
726 | without any payload). Upon receiving the service's response, you | ||
727 | should call a callback provided to your helper function's API. | ||
728 | |||
729 | Exercise: Figure out where you can pass values to the closures (@code{cls}). | ||
730 | |||
731 | @node Writing a user interface | ||
732 | @subsection Writing a user interface | ||
733 | |||
734 | Given a client library, all it takes to access a service now is to | ||
735 | combine calls to the client library with parsing command-line | ||
736 | options. | ||
737 | |||
738 | Exercise: Call your client API from your @code{run()} method in your | ||
739 | client application to send a request to the service. For example, | ||
740 | send a 32-bit integer value based on a number given at the | ||
741 | command-line to the service. | ||
742 | |||
743 | @node Writing a Service | ||
744 | @section Writing a Service | ||
745 | |||
746 | Before you can test the client you've written so far, you'll need to also | ||
747 | implement the corresponding service. | ||
748 | |||
749 | @node Code Placement | ||
750 | @subsection Code Placement | ||
751 | |||
752 | New services are placed in their own subdirectory under @file{gnunet/src}. | ||
753 | This subdirectory should contain the API implementation file @file{SERVICE\_api.c}, | ||
754 | the description of the client-service protocol @file{SERVICE.h} and P2P protocol | ||
755 | @file{SERVICE\_protocol.h}, the implementation of the service itself | ||
756 | @file{gnunet-service-SERVICE.h} and several files for tests, including test code | ||
757 | and configuration files. | ||
758 | |||
759 | @node Starting a Service | ||
760 | @subsection Starting a Service | ||
761 | |||
762 | The key API definition for creating a service is the @code{GNUNET\_SERVICE\_MAIN} macro: | ||
763 | @example | ||
764 | @verbatiminclude tutorial-examples/007.c | ||
765 | @end example | ||
766 | |||
767 | In addition to the service name and flags, the macro takes three | ||
768 | functions, typically called @code{run}, @code{client\_connect\_cb} and | ||
769 | @code{client\_disconnect\_cb} as well as an array of message handlers | ||
770 | that will be called for incoming messages from clients. | ||
771 | |||
772 | A minimal version of the three central service funtions would look | ||
773 | like this: | ||
774 | @example | ||
775 | @verbatiminclude tutorial-examples/008.c | ||
776 | @end example | ||
777 | |||
778 | Exercise: Write a stub service that processes no messages at all | ||
779 | in your code. Create a default configuration for it, integrate it | ||
780 | with the build system and start the service from | ||
781 | @command{gnunet-service-arm} using @command{gnunet-arm -i NAME}. | ||
782 | |||
783 | Exercise: Figure out how to set the closure (@code{cls}) for handlers | ||
784 | of a service. | ||
785 | |||
786 | Exercise: Figure out how to send messages from the service back to the | ||
787 | client. | ||
788 | |||
789 | Each handler function in the service @b{must} eventually (possibly in some | ||
790 | asynchronous continuation) call @code{GNUNET\_SERVICE\_client\_continue()}. | ||
791 | Only after this call additional messages from the same client may | ||
792 | be processed. This way, the service can throttle processing messages | ||
793 | from the same client. | ||
794 | |||
795 | Exercise: Change the service to ``handle'' the message from your | ||
796 | client (for now, by printing a message). What happens if you | ||
797 | forget to call @code{GNUNET\_SERVICE\_client\_continue()}? | ||
798 | |||
799 | @node Interacting directly with other Peers using the CORE Service | ||
800 | @section Interacting directly with other Peers using the CORE Service | ||
801 | |||
802 | FIXME: This section still needs to be updated to the lastest API! | ||
803 | |||
804 | One of the most important services in GNUnet is the @code{CORE} service | ||
805 | managing connections between peers and handling encryption between peers. | ||
806 | |||
807 | One of the first things any service that extends the P2P protocol typically does | ||
808 | is connect to the @code{CORE} service using: | ||
809 | @example | ||
810 | @verbatiminclude tutorial-examples/009.c | ||
811 | @end example | ||
812 | |||
813 | @node New P2P connections | ||
814 | @subsection New P2P connections | ||
815 | |||
816 | Before any traffic with a different peer can be exchanged, the peer must be | ||
817 | known to the service. This is notified by the @code{CORE} @code{connects} callback, | ||
818 | which communicates the identity of the new peer to the service: | ||
819 | @example | ||
820 | @verbatiminclude tutorial-examples/010.c | ||
821 | @end example | ||
822 | |||
823 | Note that whatever you return from @code{connects} is given as the | ||
824 | @i{cls} argument to the message handlers for messages from | ||
825 | the respective peer. | ||
826 | |||
827 | Exercise: Create a service that connects to the @code{CORE}. Then | ||
828 | start (and connect) two peers and print a message once your connect | ||
829 | callback is invoked. | ||
830 | |||
831 | @node Receiving P2P Messages | ||
832 | @subsection Receiving P2P Messages | ||
833 | |||
834 | To receive messages from @code{CORE}, you pass the desired | ||
835 | @i{handlers} to the @code{GNUNET\_CORE\_connect()} function, | ||
836 | just as we showed for services. | ||
837 | |||
838 | It is your responsibility to process messages fast enough or | ||
839 | to implement flow control. If an application does not process | ||
840 | CORE messages fast enough, CORE will randomly drop messages | ||
841 | to not keep a very long queue in memory. | ||
842 | |||
843 | Exercise: Start one peer with a new service that has a message | ||
844 | handler and start a second peer that only has your ``old'' service | ||
845 | without message handlers. Which ``connect'' handlers are invoked when | ||
846 | the two peers are connected? Why? | ||
847 | |||
848 | @node Sending P2P Messages | ||
849 | @subsection Sending P2P Messages | ||
850 | |||
851 | You can transmit messages to other peers using the @i{mq} you were | ||
852 | given during the @code{connect} callback. Note that the @i{mq} | ||
853 | automatically is released upon @code{disconnect} and that you must | ||
854 | not use it afterwards. | ||
855 | |||
856 | It is your responsibility to not over-fill the message queue, GNUnet | ||
857 | will send the messages roughly in the order given as soon as possible. | ||
858 | |||
859 | Exercise: Write a service that upon connect sends messages as | ||
860 | fast as possible to the other peer (the other peer should run a | ||
861 | service that ``processes'' those messages). How fast is the | ||
862 | transmission? Count using the STATISTICS service on both ends. Are | ||
863 | messages lost? How can you transmit messages faster? What happens if | ||
864 | you stop the peer that is receiving your messages? | ||
865 | |||
866 | @node End of P2P connections | ||
867 | @subsection End of P2P connections | ||
868 | |||
869 | If a message handler returns @code{GNUNET\_SYSERR}, the remote peer shuts down or | ||
870 | there is an unrecoverable network disconnection, CORE notifies the service that | ||
871 | the peer disconnected. After this notification no more messages will be received | ||
872 | from the peer and the service is no longer allowed to send messages to the peer. | ||
873 | The disconnect callback looks like the following: | ||
874 | @example | ||
875 | @verbatiminclude tutorial-examples/011.c | ||
876 | @end example | ||
877 | |||
878 | Exercise: Fix your service to handle peer disconnects. | ||
879 | |||
880 | @node Storing peer-specific data using the PEERSTORE service | ||
881 | @section Storing peer-specific data using the PEERSTORE service | ||
882 | |||
883 | GNUnet's PEERSTORE service offers a persistorage for arbitrary peer-specific data. | ||
884 | Other GNUnet services can use the PEERSTORE to store, retrieve and monitor data records. | ||
885 | Each data record stored with PEERSTORE contains the following fields: | ||
886 | |||
887 | @itemize | ||
888 | @item subsystem: Name of the subsystem responsible for the record. | ||
889 | @item peerid: Identity of the peer this record is related to. | ||
890 | @item key: a key string identifying the record. | ||
891 | @item value: binary record value. | ||
892 | @item expiry: record expiry date. | ||
893 | @end itemize | ||
894 | |||
895 | The first step is to start a connection to the PEERSTORE service: | ||
896 | @example | ||
897 | @verbatiminclude tutorial-examples/012.c | ||
898 | @end example | ||
899 | |||
900 | The service handle @code{peerstore_handle} will be needed for all subsequent | ||
901 | PEERSTORE operations. | ||
902 | |||
903 | @node Storing records | ||
904 | @subsection Storing records | ||
905 | |||
906 | To store a new record, use the following function: | ||
907 | @example | ||
908 | @verbatiminclude tutorial-examples/013.c | ||
909 | @end example | ||
910 | |||
911 | The @code{options} parameter can either be @code{GNUNET_PEERSTORE_STOREOPTION_MULTIPLE} | ||
912 | which means that multiple values can be stored under the same key combination (subsystem, peerid, key), | ||
913 | or @code{GNUNET_PEERSTORE_STOREOPTION_REPLACE} which means that PEERSTORE will replace any | ||
914 | existing values under the given key combination (subsystem, peerid, key) with the new given value. | ||
915 | |||
916 | The continuation function @code{cont} will be called after the store request is successfully | ||
917 | sent to the PEERSTORE service. This does not guarantee that the record is successfully stored, only | ||
918 | that it was received by the service. | ||
919 | |||
920 | The @code{GNUNET_PEERSTORE_store} function returns a handle to the store operation. This handle | ||
921 | can be used to cancel the store operation only before the continuation function is called: | ||
922 | @example | ||
923 | void | ||
924 | GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc); | ||
925 | @end example | ||
926 | |||
927 | @node Retrieving records | ||
928 | @subsection Retrieving records | ||
929 | |||
930 | To retrieve stored records, use the following function: | ||
931 | @example | ||
932 | @verbatiminclude tutorial-examples/014.c | ||
933 | @end example | ||
934 | |||
935 | The values of @code{peer} and @code{key} can be @code{NULL}. This allows the | ||
936 | iteration over values stored under any of the following key combinations: | ||
937 | @itemize | ||
938 | @item (subsystem) | ||
939 | @item (subsystem, peerid) | ||
940 | @item (subsystem, key) | ||
941 | @item (subsystem, peerid, key) | ||
942 | @end itemize | ||
943 | |||
944 | The @code{callback} function will be called once with each retrieved record and once | ||
945 | more with a @code{NULL} record to signal the end of results. | ||
946 | |||
947 | The @code{GNUNET_PEERSTORE_iterate} function returns a handle to the iterate operation. This | ||
948 | handle can be used to cancel the iterate operation only before the callback function is called with | ||
949 | a @code{NULL} record. | ||
950 | |||
951 | @node Monitoring records | ||
952 | @subsection Monitoring records | ||
953 | |||
954 | PEERSTORE offers the functionality of monitoring for new records stored under a specific key | ||
955 | combination (subsystem, peerid, key). To start the monitoring, use the following function: | ||
956 | @example | ||
957 | @verbatiminclude tutorial-examples/015.c | ||
958 | @end example | ||
959 | |||
960 | Whenever a new record is stored under the given key combination, the @code{callback} function | ||
961 | will be called with this new record. This will continue until the connection to the PEERSTORE service | ||
962 | is broken or the watch operation is canceled: | ||
963 | @example | ||
964 | @verbatiminclude tutorial-examples/016.c | ||
965 | @end example | ||
966 | |||
967 | @node Disconnecting from PEERSTORE | ||
968 | @subsection Disconnecting from PEERSTORE | ||
969 | |||
970 | When the connection to the PEERSTORE service is no longer needed, disconnect using the following | ||
971 | function: | ||
972 | @example | ||
973 | @verbatiminclude tutorial-examples/017.c | ||
974 | @end example | ||
975 | |||
976 | If the @code{sync_first} flag is set to @code{GNUNET_YES}, the API will delay the | ||
977 | disconnection until all store requests are received by the PEERSTORE service. Otherwise, | ||
978 | it will disconnect immediately. | ||
979 | |||
980 | @node Using the DHT | ||
981 | @section Using the DHT | ||
982 | |||
983 | The DHT allows to store data so other peers in the P2P network can | ||
984 | access it and retrieve data stored by any peers in the network. | ||
985 | This section will explain how to use the DHT. Of course, the first | ||
986 | thing to do is to connect to the DHT service: | ||
987 | @example | ||
988 | @verbatiminclude tutorial-examples/018.c | ||
989 | @end example | ||
990 | |||
991 | The second parameter indicates how many requests in parallel to expect. | ||
992 | It is not a hard limit, but a good approximation will make the DHT more | ||
993 | efficient. | ||
994 | |||
995 | @node Storing data in the DHT | ||
996 | @subsection Storing data in the DHT | ||
997 | Since the DHT is a dynamic environment (peers join and leave frequently) | ||
998 | the data that we put in the DHT does not stay there indefinitely. It is | ||
999 | important to ``refresh'' the data periodically by simply storing it again, | ||
1000 | in order to make sure other peers can access it. | ||
1001 | |||
1002 | The put API call offers a callback to signal that the PUT request has been | ||
1003 | sent. This does not guarantee that the data is accessible to others peers, | ||
1004 | or even that is has been stored, only that the service has requested to | ||
1005 | a neighboring peer the retransmission of the PUT request towards its final | ||
1006 | destination. Currently there is no feedback about whether or not the data | ||
1007 | has been sucessfully stored or where it has been stored. In order to improve | ||
1008 | the availablilty of the data and to compensate for possible errors, peers leaving | ||
1009 | and other unfavorable events, just make several PUT requests! | ||
1010 | @example | ||
1011 | @verbatiminclude tutorial-examples/019.c | ||
1012 | @end example | ||
1013 | |||
1014 | Exercise: Store a value in the DHT periodically to make sure it is available | ||
1015 | over time. You might consider using the function @code{GNUNET\_SCHEDULER\_add\_delayed} | ||
1016 | and call @code{GNUNET\_DHT\_put} from inside a helper function. | ||
1017 | |||
1018 | @node Obtaining data from the DHT | ||
1019 | @subsection Obtaining data from the DHT | ||
1020 | As we saw in the previous example, the DHT works in an asynchronous mode. | ||
1021 | Each request to the DHT is executed ``in the background'' and the API | ||
1022 | calls return immediately. In order to receive results from the DHT, the | ||
1023 | API provides a callback. Once started, the request runs in the service, | ||
1024 | the service will try to get as many results as possible (filtering out | ||
1025 | duplicates) until the timeout expires or we explicitly stop the request. | ||
1026 | It is possible to give a ``forever'' timeout with | ||
1027 | @code{GNUNET\_TIME\_UNIT\_FOREVER\_REL}. | ||
1028 | |||
1029 | If we give a route option @code{GNUNET\_DHT\_RO\_RECORD\_ROUTE} the callback | ||
1030 | will get a list of all the peers the data has travelled, both on the PUT | ||
1031 | path and on the GET path. | ||
1032 | @example | ||
1033 | @verbatiminclude tutorial-examples/020.c | ||
1034 | @end example | ||
1035 | |||
1036 | Exercise: Store a value in the DHT and after a while retrieve it. Show the IDs of all | ||
1037 | the peers the requests have gone through. In order to convert a peer ID to a string, use | ||
1038 | the function @code{GNUNET\_i2s}. Pay attention to the route option parameters in both calls! | ||
1039 | |||
1040 | @node Implementing a block plugin | ||
1041 | @subsection Implementing a block plugin | ||
1042 | |||
1043 | In order to store data in the DHT, it is necessary to provide a block | ||
1044 | plugin. The DHT uses the block plugin to ensure that only well-formed | ||
1045 | requests and replies are transmitted over the network. | ||
1046 | |||
1047 | The block plugin should be put in a file @file{plugin\_block\_SERVICE.c} | ||
1048 | in the service's respective directory. The | ||
1049 | mandatory functions that need to be implemented for a block plugin are | ||
1050 | described in the following sections. | ||
1051 | |||
1052 | @node Validating requests and replies | ||
1053 | @subsubsection Validating requests and replies | ||
1054 | |||
1055 | The evaluate function should validate a reply or a request. It returns | ||
1056 | a @code{GNUNET\_BLOCK\_EvaluationResult}, which is an enumeration. All | ||
1057 | possible answers are in @file{gnunet\_block\_lib.h}. The function will | ||
1058 | be called with a @code{reply\_block} argument of @code{NULL} for | ||
1059 | requests. Note that depending on how @code{evaluate} is called, only | ||
1060 | some of the possible return values are valid. The specific meaning of | ||
1061 | the @code{xquery} argument is application-specific. Applications that | ||
1062 | do not use an extended query should check that the @code{xquery\_size} | ||
1063 | is zero. The block group is typically used to filter duplicate | ||
1064 | replies. | ||
1065 | @example | ||
1066 | @verbatiminclude tutorial-examples/021.c | ||
1067 | @end example | ||
1068 | |||
1069 | Note that it is mandatory to detect duplicate replies in this function | ||
1070 | and return the respective status code. Duplicate detection is | ||
1071 | typically done using the Bloom filter block group provided by | ||
1072 | @file{libgnunetblockgroup.so}. Failure to do so may cause replies to | ||
1073 | circle in the network. | ||
1074 | |||
1075 | @node Deriving a key from a reply | ||
1076 | @subsubsection Deriving a key from a reply | ||
1077 | |||
1078 | The DHT can operate more efficiently if it is possible to derive a key | ||
1079 | from the value of the corresponding block. The @code{get\_key} | ||
1080 | function is used to obtain the key of a block --- for example, by | ||
1081 | means of hashing. If deriving the key is not possible, the function | ||
1082 | should simply return @code{GNUNET\_SYSERR} (the DHT will still work | ||
1083 | just fine with such blocks). | ||
1084 | @example | ||
1085 | @verbatiminclude tutorial-examples/022.c | ||
1086 | @end example | ||
1087 | |||
1088 | @node Initialization of the plugin | ||
1089 | @subsubsection Initialization of the plugin | ||
1090 | |||
1091 | The plugin is realized as a shared C library. The library must export | ||
1092 | an initialization function which should initialize the plugin. The | ||
1093 | initialization function specifies what block types the plugin cares | ||
1094 | about and returns a struct with the functions that are to be used for | ||
1095 | validation and obtaining keys (the ones just defined above). | ||
1096 | @example | ||
1097 | @verbatiminclude tutorial-examples/023.c | ||
1098 | @end example | ||
1099 | |||
1100 | @node Shutdown of the plugin | ||
1101 | @subsubsection Shutdown of the plugin | ||
1102 | |||
1103 | Following GNUnet's general plugin API concept, the plugin must | ||
1104 | export a second function for cleaning up. It usually does very | ||
1105 | little. | ||
1106 | @example | ||
1107 | @verbatiminclude tutorial-examples/024.c | ||
1108 | @end example | ||
1109 | |||
1110 | @node Integration of the plugin with the build system | ||
1111 | @subsubsection Integration of the plugin with the build system | ||
1112 | |||
1113 | In order to compile the plugin, the @file{Makefile.am} file for the | ||
1114 | service SERVICE should contain a rule similar to this: | ||
1115 | @c* Actually this is a Makefile not C. But the whole structure of examples | ||
1116 | @c* must be improved. | ||
1117 | @example | ||
1118 | @verbatiminclude tutorial-examples/025.c | ||
1119 | @end example | ||
1120 | |||
1121 | Exercise: Write a block plugin that accepts all queries | ||
1122 | and all replies but prints information about queries and replies | ||
1123 | when the respective validation hooks are called. | ||
1124 | |||
1125 | @node Monitoring the DHT | ||
1126 | @subsection Monitoring the DHT | ||
1127 | It is possible to monitor the functioning of the local DHT service. When monitoring | ||
1128 | the DHT, the service will alert the monitoring program of any events, | ||
1129 | both started locally or received for routing from another peer. The are three different | ||
1130 | types of events possible: a GET request, a PUT request or a response (a reply to | ||
1131 | a GET). | ||
1132 | |||
1133 | Since the different events have different associated data, the API gets 3 | ||
1134 | different callbacks (one for each message type) and optional type and key parameters, | ||
1135 | to allow for filtering of messages. When an event happens, the appropiate callback | ||
1136 | is called with all the information about the event. | ||
1137 | @example | ||
1138 | @verbatiminclude tutorial-examples/026.c | ||
1139 | @end example | ||
1140 | |||
1141 | @node Debugging with gnunet-arm | ||
1142 | @section Debugging with gnunet-arm | ||
1143 | |||
1144 | Even if services are managed by @command{gnunet-arm}, you can start them with | ||
1145 | @command{gdb} or @command{valgrind}. For example, you could add the following lines | ||
1146 | to your configuration file to start the DHT service in a @command{gdb} session in a | ||
1147 | fresh @command{xterm}: | ||
1148 | |||
1149 | @example | ||
1150 | [dht] | ||
1151 | PREFIX=xterm -e gdb --args | ||
1152 | @end example | ||
1153 | |||
1154 | Alternatively, you can stop a service that was started via ARM and run it manually: | ||
1155 | |||
1156 | @example | ||
1157 | $ gnunet-arm -k dht | ||
1158 | $ gdb --args gnunet-service-dht -L DEBUG | ||
1159 | $ valgrind gnunet-service-dht -L DEBUG | ||
1160 | @end example | ||
1161 | |||
1162 | Assuming other services are well-written, they will automatically re-integrate the | ||
1163 | restarted service with the peer. | ||
1164 | |||
1165 | GNUnet provides a powerful logging mechanism providing log levels @code{ERROR}, | ||
1166 | @code{WARNING}, @code{INFO} and @code{DEBUG}. The current log level is | ||
1167 | configured using the @code{$GNUNET_FORCE_LOG} environmental variable. | ||
1168 | The @code{DEBUG} level is only available if @command{--enable-logging=verbose} was used when | ||
1169 | running @command{configure}. More details about logging can be found under | ||
1170 | @uref{https://gnunet.org/logging}. | ||
1171 | |||
1172 | You should also probably enable the creation of core files, by setting | ||
1173 | @code{ulimit}, and echo'ing @code{1} into @file{/proc/sys/kernel/core\_uses\_pid}. | ||
1174 | Then you can investigate the core dumps with @command{gdb}, which is often | ||
1175 | the fastest method to find simple errors. | ||
1176 | |||
1177 | Exercise: Add a memory leak to your service and obtain a trace | ||
1178 | pointing to the leak using @command{valgrind} while running the service | ||
1179 | from @command{gnunet-service-arm}. | ||
1180 | |||
1181 | @bye | ||
diff --git a/doc/gnunet.texi b/doc/gnunet.texi index 61eb4f1bb..7803e52d3 100644 --- a/doc/gnunet.texi +++ b/doc/gnunet.texi | |||
@@ -1,4 +1,6 @@ | |||
1 | \input texinfo @c -*-texinfo-*- | 1 | \input texinfo |
2 | @c -*-texinfo-*- | ||
3 | |||
2 | @c %**start of header | 4 | @c %**start of header |
3 | @setfilename gnunet.info | 5 | @setfilename gnunet.info |
4 | @documentencoding UTF-8 | 6 | @documentencoding UTF-8 |
@@ -7,6 +9,13 @@ | |||
7 | 9 | ||
8 | @include version.texi | 10 | @include version.texi |
9 | 11 | ||
12 | @c Set Versions which might be used in more than one place: | ||
13 | @set GNUNET-DIST-URL https://ftp.gnu.org/gnu/gnunet/ | ||
14 | @set GNUNET-VERSION 0.10.1 | ||
15 | @set GNURL-VERSION-CURRENT 7.55.1 | ||
16 | @set GNURL-DIST-URL https://gnunet.org/sites/default/files/ | ||
17 | @c @set OPENPGP-SIGNING-KEY-ID | ||
18 | |||
10 | @copying | 19 | @copying |
11 | Copyright @copyright{} 2001-2017 GNUnet e.V. | 20 | Copyright @copyright{} 2001-2017 GNUnet e.V. |
12 | 21 | ||
@@ -167,7 +176,3 @@ Installation | |||
167 | @printindex fn | 176 | @printindex fn |
168 | 177 | ||
169 | @bye | 178 | @bye |
170 | |||
171 | @c Local Variables: | ||
172 | @c ispell-local-dictionary: "american"; | ||
173 | @c End: | ||
diff --git a/doc/images/daemon_lego_block.svg b/doc/images/daemon_lego_block.svg new file mode 100644 index 000000000..38ad90d13 --- /dev/null +++ b/doc/images/daemon_lego_block.svg | |||
@@ -0,0 +1,126 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | <!-- Created with Inkscape (http://www.inkscape.org/) --> | ||
3 | |||
4 | <svg | ||
5 | xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
6 | xmlns:cc="http://creativecommons.org/ns#" | ||
7 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
8 | xmlns:svg="http://www.w3.org/2000/svg" | ||
9 | xmlns="http://www.w3.org/2000/svg" | ||
10 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
11 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
12 | width="744.09448819" | ||
13 | height="1052.3622047" | ||
14 | id="svg6781" | ||
15 | version="1.1" | ||
16 | inkscape:version="0.48.2 r9819" | ||
17 | sodipodi:docname="New document 58"> | ||
18 | <defs | ||
19 | id="defs6783" /> | ||
20 | <sodipodi:namedview | ||
21 | id="base" | ||
22 | pagecolor="#ffffff" | ||
23 | bordercolor="#666666" | ||
24 | borderopacity="1.0" | ||
25 | inkscape:pageopacity="0.0" | ||
26 | inkscape:pageshadow="2" | ||
27 | inkscape:zoom="0.35" | ||
28 | inkscape:cx="375" | ||
29 | inkscape:cy="520" | ||
30 | inkscape:document-units="px" | ||
31 | inkscape:current-layer="layer1" | ||
32 | showgrid="false" | ||
33 | inkscape:window-width="1366" | ||
34 | inkscape:window-height="721" | ||
35 | inkscape:window-x="-2" | ||
36 | inkscape:window-y="-3" | ||
37 | inkscape:window-maximized="1" /> | ||
38 | <metadata | ||
39 | id="metadata6786"> | ||
40 | <rdf:RDF> | ||
41 | <cc:Work | ||
42 | rdf:about=""> | ||
43 | <dc:format>image/svg+xml</dc:format> | ||
44 | <dc:type | ||
45 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
46 | <dc:title></dc:title> | ||
47 | </cc:Work> | ||
48 | </rdf:RDF> | ||
49 | </metadata> | ||
50 | <g | ||
51 | inkscape:label="Layer 1" | ||
52 | inkscape:groupmode="layer" | ||
53 | id="layer1"> | ||
54 | <g | ||
55 | transform="translate(-4.5298577,-148.04661)" | ||
56 | id="g6746"> | ||
57 | <path | ||
58 | style="fill:#5fd38d;fill-opacity:1;stroke:#faf6a2;stroke-width:1.99014676;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
59 | d="m 183.84284,595.7683 350.8064,0 0,202.04036 -350.8064,0 z" | ||
60 | id="path6693" | ||
61 | inkscape:connector-curvature="0" /> | ||
62 | <rect | ||
63 | style="fill:#ffffff;fill-opacity:1;stroke:#faf6a2;stroke-width:2.22747946;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
64 | id="rect6695" | ||
65 | width="66.670067" | ||
66 | height="75.18058" | ||
67 | x="223.74881" | ||
68 | y="737.19458" /> | ||
69 | <rect | ||
70 | y="737.19458" | ||
71 | x="331.83514" | ||
72 | height="67.323441" | ||
73 | width="66.670067" | ||
74 | id="rect6697" | ||
75 | style="fill:#ffffff;fill-opacity:1;stroke:#faf6a2;stroke-width:2.10787106;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" /> | ||
76 | <rect | ||
77 | style="fill:#ffffff;fill-opacity:1;stroke:#faf6a2;stroke-width:2.06117821;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
78 | id="rect6699" | ||
79 | width="66.670067" | ||
80 | height="64.373825" | ||
81 | x="434.8707" | ||
82 | y="737.19458" /> | ||
83 | <path | ||
84 | style="fill:#37c871;fill-opacity:1;stroke:#faf6a2;stroke-width:0.98368376;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
85 | d="m 223.60976,736.21851 67.23534,0.38374 0,23.63648 -67.23534,37.13818 z" | ||
86 | id="path6701" | ||
87 | inkscape:connector-curvature="0" | ||
88 | sodipodi:nodetypes="ccccc" /> | ||
89 | <path | ||
90 | sodipodi:nodetypes="ccccc" | ||
91 | inkscape:connector-curvature="0" | ||
92 | id="path6703" | ||
93 | d="m 331.69608,736.21851 67.23534,0.3894 0,23.98466 -67.23534,37.68524 z" | ||
94 | style="fill:#37c871;fill-opacity:1;stroke:#faf6a2;stroke-width:0.99090236;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" /> | ||
95 | <path | ||
96 | style="fill:#37c871;fill-opacity:1;stroke:#faf6a2;stroke-width:0.98368376;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
97 | d="m 434.73164,736.21851 67.23534,0.38374 0,23.63648 -67.23534,37.13818 z" | ||
98 | id="path6705" | ||
99 | inkscape:connector-curvature="0" | ||
100 | sodipodi:nodetypes="ccccc" /> | ||
101 | <path | ||
102 | style="fill:#37c871;fill-opacity:1;stroke:#faf6a2;stroke-width:1.92068994;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
103 | d="m 533.72659,595.02309 56.12366,-29.34622 -1.01015,190.24271 -55.11351,41.45733 z" | ||
104 | id="path6707" | ||
105 | inkscape:connector-curvature="0" | ||
106 | sodipodi:nodetypes="ccccc" /> | ||
107 | <path | ||
108 | style="fill:#37c871;fill-opacity:1;stroke:#faf6a2;stroke-width:1.99424875;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
109 | d="m 245.46708,566.47881 345.46203,-1.01015 -56.56854,31.31472 -349.50264,-1.01014 z" | ||
110 | id="path6709" | ||
111 | inkscape:connector-curvature="0" | ||
112 | sodipodi:nodetypes="ccccc" /> | ||
113 | <text | ||
114 | sodipodi:linespacing="125%" | ||
115 | id="text6715" | ||
116 | y="677.59558" | ||
117 | x="234.35539" | ||
118 | style="font-size:36px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
119 | xml:space="preserve"><tspan | ||
120 | y="677.59558" | ||
121 | x="234.35539" | ||
122 | id="tspan6717" | ||
123 | sodipodi:role="line">User Interface</tspan></text> | ||
124 | </g> | ||
125 | </g> | ||
126 | </svg> | ||
diff --git a/doc/images/gnunet-tutorial-service.png b/doc/images/gnunet-tutorial-service.png new file mode 100644 index 000000000..6daed2f35 --- /dev/null +++ b/doc/images/gnunet-tutorial-service.png | |||
Binary files differ | |||
diff --git a/doc/images/gnunet-tutorial-system.png b/doc/images/gnunet-tutorial-system.png new file mode 100644 index 000000000..8b54e16cf --- /dev/null +++ b/doc/images/gnunet-tutorial-system.png | |||
Binary files differ | |||
diff --git a/doc/images/lego_stack.svg b/doc/images/lego_stack.svg new file mode 100644 index 000000000..a0e8017c3 --- /dev/null +++ b/doc/images/lego_stack.svg | |||
@@ -0,0 +1,737 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | <!-- Created with Inkscape (http://www.inkscape.org/) --> | ||
3 | |||
4 | <svg | ||
5 | xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" | ||
6 | xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
7 | xmlns:cc="http://creativecommons.org/ns#" | ||
8 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
9 | xmlns:svg="http://www.w3.org/2000/svg" | ||
10 | xmlns="http://www.w3.org/2000/svg" | ||
11 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
12 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
13 | width="744.09448819" | ||
14 | height="1052.3622047" | ||
15 | id="svg2" | ||
16 | version="1.1" | ||
17 | inkscape:version="0.48.1 r9760" | ||
18 | sodipodi:docname="System.svg"> | ||
19 | <defs | ||
20 | id="defs4"> | ||
21 | <linearGradient | ||
22 | id="linearGradient6602"> | ||
23 | <stop | ||
24 | style="stop-color:#df8060;stop-opacity:1;" | ||
25 | offset="0" | ||
26 | id="stop6604" /> | ||
27 | <stop | ||
28 | style="stop-color:#df8002;stop-opacity:0;" | ||
29 | offset="1" | ||
30 | id="stop6606" /> | ||
31 | </linearGradient> | ||
32 | <linearGradient | ||
33 | id="linearGradient4392" | ||
34 | osb:paint="solid"> | ||
35 | <stop | ||
36 | style="stop-color:#faf6a6;stop-opacity:1;" | ||
37 | offset="0" | ||
38 | id="stop4394" /> | ||
39 | </linearGradient> | ||
40 | <inkscape:perspective | ||
41 | sodipodi:type="inkscape:persp3d" | ||
42 | inkscape:vp_x="883.99395 : 559.99673 : 1" | ||
43 | inkscape:vp_y="13.319386 : 993.87659 : 0" | ||
44 | inkscape:vp_z="285.3157 : 504.79962 : 1" | ||
45 | inkscape:persp3d-origin="481.39556 : 281.96355 : 1" | ||
46 | id="perspective3070" /> | ||
47 | <inkscape:perspective | ||
48 | sodipodi:type="inkscape:persp3d" | ||
49 | inkscape:vp_x="76.097926 : 349.87282 : 1" | ||
50 | inkscape:vp_y="-13.319386 : 979.366 : 0" | ||
51 | inkscape:vp_z="752.55793 : 376.31441 : 1" | ||
52 | inkscape:persp3d-origin="373.64045 : 350.98006 : 1" | ||
53 | id="perspective3012" /> | ||
54 | </defs> | ||
55 | <sodipodi:namedview | ||
56 | id="base" | ||
57 | pagecolor="#ffffff" | ||
58 | bordercolor="#666666" | ||
59 | borderopacity="1.0" | ||
60 | inkscape:pageopacity="0.0" | ||
61 | inkscape:pageshadow="2" | ||
62 | inkscape:zoom="0.98994949" | ||
63 | inkscape:cx="322.06882" | ||
64 | inkscape:cy="568.82291" | ||
65 | inkscape:document-units="px" | ||
66 | inkscape:current-layer="layer1" | ||
67 | showgrid="false" | ||
68 | inkscape:window-width="846" | ||
69 | inkscape:window-height="963" | ||
70 | inkscape:window-x="59" | ||
71 | inkscape:window-y="0" | ||
72 | inkscape:window-maximized="0" /> | ||
73 | <metadata | ||
74 | id="metadata7"> | ||
75 | <rdf:RDF> | ||
76 | <cc:Work | ||
77 | rdf:about=""> | ||
78 | <dc:format>image/svg+xml</dc:format> | ||
79 | <dc:type | ||
80 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
81 | <dc:title /> | ||
82 | </cc:Work> | ||
83 | </rdf:RDF> | ||
84 | </metadata> | ||
85 | <g | ||
86 | inkscape:label="Layer 1" | ||
87 | inkscape:groupmode="layer" | ||
88 | id="layer1"> | ||
89 | <text | ||
90 | xml:space="preserve" | ||
91 | style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
92 | x="352.03815" | ||
93 | y="-190.12544" | ||
94 | id="text6623" | ||
95 | sodipodi:linespacing="125%"><tspan | ||
96 | sodipodi:role="line" | ||
97 | id="tspan6625" | ||
98 | x="352.03815" | ||
99 | y="-190.12544" /></text> | ||
100 | <text | ||
101 | xml:space="preserve" | ||
102 | style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
103 | x="338.40109" | ||
104 | y="-300.73715" | ||
105 | id="text6627" | ||
106 | sodipodi:linespacing="125%"><tspan | ||
107 | sodipodi:role="line" | ||
108 | id="tspan6629" | ||
109 | x="338.40109" | ||
110 | y="-300.73715" /></text> | ||
111 | <g | ||
112 | style="font-size:24px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
113 | id="text6643" /> | ||
114 | <text | ||
115 | xml:space="preserve" | ||
116 | style="font-size:24px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
117 | x="71.720833" | ||
118 | y="95.747719" | ||
119 | id="text6648" | ||
120 | sodipodi:linespacing="125%"><tspan | ||
121 | sodipodi:role="line" | ||
122 | id="tspan6650" | ||
123 | x="71.720833" | ||
124 | y="95.747719" /></text> | ||
125 | <text | ||
126 | xml:space="preserve" | ||
127 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
128 | x="262.63965" | ||
129 | y="666.48389" | ||
130 | id="text6711" | ||
131 | sodipodi:linespacing="125%"><tspan | ||
132 | sodipodi:role="line" | ||
133 | id="tspan6713" | ||
134 | x="262.63965" | ||
135 | y="666.48389" /></text> | ||
136 | <path | ||
137 | inkscape:connector-curvature="0" | ||
138 | id="path3506" | ||
139 | d="m 198.00647,673.76257 236.93358,0 0,158.2919 -236.93358,0 z" | ||
140 | style="fill:#000000;fill-opacity:1;stroke:#faf6a2;stroke-width:1.44768786;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" /> | ||
141 | <path | ||
142 | sodipodi:nodetypes="ccccc" | ||
143 | inkscape:connector-curvature="0" | ||
144 | id="path3432" | ||
145 | d="m 169.32669,654.90334 464.83332,-2.26992 -33.76593,25.73079 -483.97287,-0.12904 z" | ||
146 | style="fill:#deaa87;fill-opacity:1;stroke:#faf6a2;stroke-width:2.18398547;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" /> | ||
147 | <rect | ||
148 | style="fill:#000000;fill-opacity:1;stroke:#59000c;stroke-width:1.35822594;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0.48230088;stroke-dasharray:none;stroke-dashoffset:0" | ||
149 | id="rect3416" | ||
150 | width="28.495705" | ||
151 | height="172.2845" | ||
152 | x="464.19418" | ||
153 | y="518.96954" /> | ||
154 | <rect | ||
155 | style="fill:#000000;fill-opacity:1;stroke:#59000c;stroke-width:1.36876941;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0.48230088;stroke-dasharray:none;stroke-dashoffset:0" | ||
156 | id="rect3414" | ||
157 | width="34.729141" | ||
158 | height="170.67587" | ||
159 | x="340.86124" | ||
160 | y="517.93475" /> | ||
161 | <path | ||
162 | style="fill:#deaa87;fill-opacity:1;stroke:#faf6a2;stroke-width:2.04969239;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
163 | d="m 246.8138,499.06358 386.50295,-0.94821 -41.88736,26.04231 -413.96081,0 z" | ||
164 | id="rect6568-0" | ||
165 | inkscape:connector-curvature="0" | ||
166 | sodipodi:nodetypes="ccccc" /> | ||
167 | <path | ||
168 | style="fill:#ffdd55;fill-opacity:1;stroke:#faf6a2;stroke-width:1.49989259;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
169 | d="m 276.05867,399.52042 323.05541,0 0,124.61741 -323.05541,0 z" | ||
170 | id="rect5973" | ||
171 | inkscape:connector-curvature="0" /> | ||
172 | <path | ||
173 | style="fill:#ffcc00;fill-opacity:1;stroke:#faf6a2;stroke-width:1.19094384;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
174 | d="m 599.16863,399.06078 34.35465,-18.10059 0,117.34068 -34.35465,25.57066 z" | ||
175 | id="rect6542" | ||
176 | inkscape:connector-curvature="0" | ||
177 | sodipodi:nodetypes="ccccc" /> | ||
178 | <rect | ||
179 | style="fill:#c87137;fill-opacity:1;stroke:#c48069;stroke-width:1.50087094;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
180 | id="rect6557" | ||
181 | width="322.88623" | ||
182 | height="30.529778" | ||
183 | x="276.67755" | ||
184 | y="368.99368" /> | ||
185 | <path | ||
186 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:0.50882494;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
187 | d="m 598.94047,368.99367 34.58281,-16.82253 0,28.66061 -34.58281,18.06864 z" | ||
188 | id="rect6561" | ||
189 | inkscape:connector-curvature="0" | ||
190 | sodipodi:nodetypes="ccccc" /> | ||
191 | <path | ||
192 | sodipodi:nodetypes="ccccc" | ||
193 | inkscape:connector-curvature="0" | ||
194 | id="path6564" | ||
195 | d="m 598.94047,369.07046 34.30741,-17.12981 0,29.18412 -34.30741,18.39868 z" | ||
196 | style="fill:#c87137;fill-opacity:1;stroke:#faf6a2;stroke-width:0.51140249;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
197 | inkscape:transform-center-x="-70.147578" | ||
198 | inkscape:transform-center-y="15.429055" /> | ||
199 | <path | ||
200 | style="fill:#d38d5f;fill-opacity:1;stroke:#faf6a2;stroke-width:1.47079194;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
201 | d="m 330.2508,353.23478 302.87005,-0.62306 -38.33414,16.82253 -318.87597,0 z" | ||
202 | id="rect6568" | ||
203 | inkscape:connector-curvature="0" | ||
204 | sodipodi:nodetypes="ccccc" /> | ||
205 | <text | ||
206 | xml:space="preserve" | ||
207 | style="font-size:22.32217598px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
208 | x="391.63083" | ||
209 | y="461.858" | ||
210 | id="text6656" | ||
211 | sodipodi:linespacing="125%" | ||
212 | transform="scale(1.0052948,0.9947331)"><tspan | ||
213 | sodipodi:role="line" | ||
214 | id="tspan6658" | ||
215 | x="391.63083" | ||
216 | y="461.858">Service</tspan></text> | ||
217 | <path | ||
218 | sodipodi:nodetypes="ccccc" | ||
219 | inkscape:connector-curvature="0" | ||
220 | id="path6707" | ||
221 | d="m 598.75503,244.83802 34.98432,-18.10059 0.26082,125.2709 -35.24514,17.64044 z" | ||
222 | style="fill:#37c871;fill-opacity:1;stroke:#faf6a2;stroke-width:1.19094384;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" /> | ||
223 | <path | ||
224 | sodipodi:nodetypes="ccccc" | ||
225 | inkscape:connector-curvature="0" | ||
226 | id="path6709" | ||
227 | d="m 419.07032,228.1132 214.71185,-1.24611 -34.63196,19.9378 L 381.29,246.18184 z" | ||
228 | style="fill:#37c871;fill-opacity:1;stroke:#faf6a2;stroke-width:1.23655474;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" /> | ||
229 | <rect | ||
230 | style="fill:#5fd38d;fill-opacity:1;stroke:#c48069;stroke-width:1.23640049;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
231 | id="rect7224" | ||
232 | width="217.86653" | ||
233 | height="122.74216" | ||
234 | x="381.70358" | ||
235 | y="246.25151" /> | ||
236 | <text | ||
237 | xml:space="preserve" | ||
238 | style="font-size:22.32217598px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
239 | x="409.16376" | ||
240 | y="302.05649" | ||
241 | id="text6715" | ||
242 | sodipodi:linespacing="125%" | ||
243 | transform="scale(1.0052948,0.9947331)"><tspan | ||
244 | sodipodi:role="line" | ||
245 | id="tspan6717" | ||
246 | x="409.16376" | ||
247 | y="302.05649">User Interface</tspan></text> | ||
248 | <g | ||
249 | id="g7219" | ||
250 | transform="matrix(0.62334353,0,0,0.61679464,281.18563,257.70936)"> | ||
251 | <rect | ||
252 | y="119.99139" | ||
253 | x="198.49498" | ||
254 | height="60.609154" | ||
255 | width="66.670067" | ||
256 | id="rect6571" | ||
257 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" /> | ||
258 | <text | ||
259 | sodipodi:linespacing="125%" | ||
260 | id="text6631" | ||
261 | y="160.39748" | ||
262 | x="206.07112" | ||
263 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
264 | xml:space="preserve"><tspan | ||
265 | y="160.39748" | ||
266 | x="206.07112" | ||
267 | id="tspan6633" | ||
268 | sodipodi:role="line">API</tspan></text> | ||
269 | </g> | ||
270 | <g | ||
271 | transform="matrix(0.62334353,0,0,0.61679464,344.78251,257.70936)" | ||
272 | id="g7226"> | ||
273 | <rect | ||
274 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
275 | id="rect7228" | ||
276 | width="66.670067" | ||
277 | height="60.609154" | ||
278 | x="198.49498" | ||
279 | y="119.99139" /> | ||
280 | <text | ||
281 | xml:space="preserve" | ||
282 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
283 | x="206.07112" | ||
284 | y="160.39748" | ||
285 | id="text7230" | ||
286 | sodipodi:linespacing="125%"><tspan | ||
287 | sodipodi:role="line" | ||
288 | id="tspan7232" | ||
289 | x="206.07112" | ||
290 | y="160.39748">API</tspan></text> | ||
291 | </g> | ||
292 | <g | ||
293 | id="g7234" | ||
294 | transform="matrix(0.62334353,0,0,0.61679464,409.3239,257.70936)"> | ||
295 | <rect | ||
296 | y="119.99139" | ||
297 | x="198.49498" | ||
298 | height="60.609154" | ||
299 | width="66.670067" | ||
300 | id="rect7236" | ||
301 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" /> | ||
302 | <text | ||
303 | sodipodi:linespacing="125%" | ||
304 | id="text7238" | ||
305 | y="160.39748" | ||
306 | x="206.07112" | ||
307 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
308 | xml:space="preserve"><tspan | ||
309 | y="160.39748" | ||
310 | x="206.07112" | ||
311 | id="tspan7240" | ||
312 | sodipodi:role="line">API</tspan></text> | ||
313 | </g> | ||
314 | <g | ||
315 | transform="matrix(0.62334353,0,0,0.61679464,175.75806,412.85048)" | ||
316 | id="g7242"> | ||
317 | <rect | ||
318 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
319 | id="rect7244" | ||
320 | width="66.670067" | ||
321 | height="60.609154" | ||
322 | x="198.49498" | ||
323 | y="119.99139" /> | ||
324 | <text | ||
325 | xml:space="preserve" | ||
326 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
327 | x="206.07112" | ||
328 | y="160.39748" | ||
329 | id="text7246" | ||
330 | sodipodi:linespacing="125%"><tspan | ||
331 | sodipodi:role="line" | ||
332 | id="tspan7248" | ||
333 | x="206.07112" | ||
334 | y="160.39748">API</tspan></text> | ||
335 | </g> | ||
336 | <g | ||
337 | id="g7250" | ||
338 | transform="matrix(0.62334353,0,0,0.61679464,240.79871,413.29105)"> | ||
339 | <rect | ||
340 | y="119.99139" | ||
341 | x="198.49498" | ||
342 | height="60.609154" | ||
343 | width="66.670067" | ||
344 | id="rect7252" | ||
345 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" /> | ||
346 | <text | ||
347 | sodipodi:linespacing="125%" | ||
348 | id="text7254" | ||
349 | y="160.39748" | ||
350 | x="206.07112" | ||
351 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
352 | xml:space="preserve"><tspan | ||
353 | y="160.39748" | ||
354 | x="206.07112" | ||
355 | id="tspan7256" | ||
356 | sodipodi:role="line">API</tspan></text> | ||
357 | </g> | ||
358 | <g | ||
359 | transform="matrix(0.62334353,0,0,0.61679464,303.79756,412.40991)" | ||
360 | id="g7258"> | ||
361 | <rect | ||
362 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
363 | id="rect7260" | ||
364 | width="66.670067" | ||
365 | height="60.609154" | ||
366 | x="198.49498" | ||
367 | y="119.99139" /> | ||
368 | <text | ||
369 | xml:space="preserve" | ||
370 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
371 | x="206.07112" | ||
372 | y="160.39748" | ||
373 | id="text7262" | ||
374 | sodipodi:linespacing="125%"><tspan | ||
375 | sodipodi:role="line" | ||
376 | id="tspan7264" | ||
377 | x="206.07112" | ||
378 | y="160.39748">API</tspan></text> | ||
379 | </g> | ||
380 | <g | ||
381 | id="g7266" | ||
382 | transform="matrix(0.62334353,0,0,0.61679464,369.88148,412.40991)"> | ||
383 | <rect | ||
384 | y="119.99139" | ||
385 | x="198.49498" | ||
386 | height="60.609154" | ||
387 | width="66.670067" | ||
388 | id="rect7268" | ||
389 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" /> | ||
390 | <text | ||
391 | sodipodi:linespacing="125%" | ||
392 | id="text7270" | ||
393 | y="160.39748" | ||
394 | x="206.07112" | ||
395 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
396 | xml:space="preserve"><tspan | ||
397 | y="160.39748" | ||
398 | x="206.07112" | ||
399 | id="tspan7272" | ||
400 | sodipodi:role="line">API</tspan></text> | ||
401 | </g> | ||
402 | <path | ||
403 | style="fill:#ffeeaa;fill-opacity:1;stroke:#faf6a2;stroke-width:0.91879815;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
404 | d="m 478.56081,554.09281 121.22633,0 0,124.61741 -121.22633,0 z" | ||
405 | id="rect5973-1" | ||
406 | inkscape:connector-curvature="0" /> | ||
407 | <g | ||
408 | transform="matrix(0.62334353,0,0,0.61679464,422.424,566.60858)" | ||
409 | id="g3474"> | ||
410 | <rect | ||
411 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
412 | id="rect3476" | ||
413 | width="66.670067" | ||
414 | height="60.609154" | ||
415 | x="198.49498" | ||
416 | y="119.99139" /> | ||
417 | <text | ||
418 | xml:space="preserve" | ||
419 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
420 | x="206.07112" | ||
421 | y="160.39748" | ||
422 | id="text3478" | ||
423 | sodipodi:linespacing="125%"><tspan | ||
424 | sodipodi:role="line" | ||
425 | id="tspan3480" | ||
426 | x="206.07112" | ||
427 | y="160.39748">API</tspan></text> | ||
428 | </g> | ||
429 | <path | ||
430 | style="fill:#ffe680;fill-opacity:1;stroke:#faf6a2;stroke-width:1.18771458;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
431 | d="m 599.60339,554.02055 33.72575,-29.55535 0.88568,128.35487 -34.61143,26.01123 z" | ||
432 | id="rect6542-8" | ||
433 | inkscape:connector-curvature="0" | ||
434 | sodipodi:nodetypes="ccccc" /> | ||
435 | <path | ||
436 | sodipodi:nodetypes="ccccc" | ||
437 | inkscape:connector-curvature="0" | ||
438 | id="path6564-2" | ||
439 | d="m 598.92998,524.03024 34.30741,-25.94116 0,26.5407 -34.30741,29.85344 z" | ||
440 | style="fill:#d38d5f;fill-opacity:1;stroke:#faf6a2;stroke-width:0.51140249;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
441 | inkscape:transform-center-x="-70.147578" | ||
442 | inkscape:transform-center-y="15.429055" /> | ||
443 | <path | ||
444 | inkscape:transform-center-y="15.492457" | ||
445 | inkscape:transform-center-x="-70.147578" | ||
446 | style="fill:#c87137;fill-opacity:1;stroke:#faf6a2;stroke-width:0.51245213;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
447 | d="m 598.92998,524.13683 34.30741,-26.04775 0,26.64977 -34.30741,29.97611 z" | ||
448 | id="path3402" | ||
449 | inkscape:connector-curvature="0" | ||
450 | sodipodi:nodetypes="ccccc" /> | ||
451 | <path | ||
452 | sodipodi:nodetypes="ccccc" | ||
453 | inkscape:connector-curvature="0" | ||
454 | id="path3404" | ||
455 | d="m 599.82047,678.2289 34.30741,-25.94116 0,26.5407 -34.30741,34.25912 z" | ||
456 | style="fill:#c87137;fill-opacity:1;stroke:#faf6a2;stroke-width:0.51140249;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
457 | inkscape:transform-center-x="-70.147578" | ||
458 | inkscape:transform-center-y="15.429055" /> | ||
459 | <path | ||
460 | sodipodi:nodetypes="ccccc" | ||
461 | inkscape:connector-curvature="0" | ||
462 | id="path3406" | ||
463 | d="m 600.04863,707.77865 33.90941,-29.55535 0.89049,128.35487 -34.7999,26.01123 z" | ||
464 | style="fill:#37c837;fill-opacity:1;stroke:#faf6a2;stroke-width:1.19094384;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" /> | ||
465 | <path | ||
466 | inkscape:connector-curvature="0" | ||
467 | id="path3410" | ||
468 | d="m 356.56358,554.09281 120.92249,0 0,124.19268 -120.92249,0 z" | ||
469 | style="fill:#ffeeaa;fill-opacity:1;stroke:#faf6a2;stroke-width:0.91608089;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" /> | ||
470 | <path | ||
471 | style="fill:#ffeeaa;fill-opacity:1;stroke:#faf6a2;stroke-width:1.11023378;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
472 | d="m 177.52518,554.09281 177.51841,0 0,124.25702 -177.51841,0 z" | ||
473 | id="path3412" | ||
474 | inkscape:connector-curvature="0" /> | ||
475 | <rect | ||
476 | style="fill:#c87137;fill-opacity:1;stroke:#c48069;stroke-width:1.11264122;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
477 | id="rect6557-7" | ||
478 | width="177.44882" | ||
479 | height="30.529778" | ||
480 | x="177.65657" | ||
481 | y="523.95343" /> | ||
482 | <rect | ||
483 | y="678.1521" | ||
484 | x="116.73995" | ||
485 | height="29.53463" | ||
486 | width="177.54182" | ||
487 | id="rect3408" | ||
488 | style="fill:#c87137;fill-opacity:1;stroke:#c48069;stroke-width:1.09464383;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" /> | ||
489 | <rect | ||
490 | y="523.95343" | ||
491 | x="356.55023" | ||
492 | height="30.529778" | ||
493 | width="120.86897" | ||
494 | id="rect3420" | ||
495 | style="fill:#c87137;fill-opacity:1;stroke:#c48069;stroke-width:0.91828173;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" /> | ||
496 | <rect | ||
497 | style="fill:#c87137;fill-opacity:1;stroke:#c48069;stroke-width:0.91828173;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
498 | id="rect3422" | ||
499 | width="120.86897" | ||
500 | height="30.529778" | ||
501 | x="478.54919" | ||
502 | y="523.95343" /> | ||
503 | <text | ||
504 | xml:space="preserve" | ||
505 | style="font-size:22.32217598px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
506 | x="372.34232" | ||
507 | y="622.53217" | ||
508 | id="text6656-2" | ||
509 | sodipodi:linespacing="125%" | ||
510 | transform="scale(1.0052948,0.9947331)"><tspan | ||
511 | sodipodi:role="line" | ||
512 | id="tspan6658-2" | ||
513 | x="372.34232" | ||
514 | y="622.53217">Service</tspan></text> | ||
515 | <text | ||
516 | sodipodi:linespacing="125%" | ||
517 | id="text3424" | ||
518 | y="622.53217" | ||
519 | x="220.56013" | ||
520 | style="font-size:22.32217598px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
521 | xml:space="preserve" | ||
522 | transform="scale(1.0052948,0.9947331)"><tspan | ||
523 | y="622.53217" | ||
524 | x="220.56013" | ||
525 | id="tspan3426" | ||
526 | sodipodi:role="line">Service</tspan></text> | ||
527 | <text | ||
528 | xml:space="preserve" | ||
529 | style="font-size:22.32217598px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
530 | x="493.85532" | ||
531 | y="622.54492" | ||
532 | id="text3428" | ||
533 | sodipodi:linespacing="125%" | ||
534 | transform="scale(1.0052948,0.9947331)"><tspan | ||
535 | sodipodi:role="line" | ||
536 | id="tspan3430" | ||
537 | x="493.85532" | ||
538 | y="622.54492">Service</tspan></text> | ||
539 | <g | ||
540 | id="g3434" | ||
541 | transform="matrix(0.62334353,0,0,0.61679464,120.10238,566.60858)"> | ||
542 | <rect | ||
543 | y="119.99139" | ||
544 | x="198.49498" | ||
545 | height="60.609154" | ||
546 | width="66.670067" | ||
547 | id="rect3436" | ||
548 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" /> | ||
549 | <text | ||
550 | sodipodi:linespacing="125%" | ||
551 | id="text3438" | ||
552 | y="160.39748" | ||
553 | x="206.07112" | ||
554 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
555 | xml:space="preserve"><tspan | ||
556 | y="160.39748" | ||
557 | x="206.07112" | ||
558 | id="tspan3440" | ||
559 | sodipodi:role="line">API</tspan></text> | ||
560 | </g> | ||
561 | <g | ||
562 | transform="matrix(0.62334353,0,0,0.61679464,181.54625,566.60858)" | ||
563 | id="g3442"> | ||
564 | <rect | ||
565 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
566 | id="rect3444" | ||
567 | width="66.670067" | ||
568 | height="60.609154" | ||
569 | x="198.49498" | ||
570 | y="119.99139" /> | ||
571 | <text | ||
572 | xml:space="preserve" | ||
573 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
574 | x="206.07112" | ||
575 | y="160.39748" | ||
576 | id="text3446" | ||
577 | sodipodi:linespacing="125%"><tspan | ||
578 | sodipodi:role="line" | ||
579 | id="tspan3448" | ||
580 | x="206.07112" | ||
581 | y="160.39748">API</tspan></text> | ||
582 | </g> | ||
583 | <g | ||
584 | id="g3450" | ||
585 | transform="matrix(0.62334353,0,0,0.61679464,242.09962,566.60858)"> | ||
586 | <rect | ||
587 | y="119.99139" | ||
588 | x="198.49498" | ||
589 | height="60.609154" | ||
590 | width="66.670067" | ||
591 | id="rect3452" | ||
592 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" /> | ||
593 | <text | ||
594 | sodipodi:linespacing="125%" | ||
595 | id="text3454" | ||
596 | y="160.39748" | ||
597 | x="206.07112" | ||
598 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
599 | xml:space="preserve"><tspan | ||
600 | y="160.39748" | ||
601 | x="206.07112" | ||
602 | id="tspan3456" | ||
603 | sodipodi:role="line">API</tspan></text> | ||
604 | </g> | ||
605 | <g | ||
606 | transform="matrix(0.62334353,0,0,0.61679464,303.54348,566.60858)" | ||
607 | id="g3458"> | ||
608 | <rect | ||
609 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
610 | id="rect3460" | ||
611 | width="66.670067" | ||
612 | height="60.609154" | ||
613 | x="198.49498" | ||
614 | y="119.99139" /> | ||
615 | <text | ||
616 | xml:space="preserve" | ||
617 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
618 | x="206.07112" | ||
619 | y="160.39748" | ||
620 | id="text3462" | ||
621 | sodipodi:linespacing="125%"><tspan | ||
622 | sodipodi:role="line" | ||
623 | id="tspan3464" | ||
624 | x="206.07112" | ||
625 | y="160.39748">API</tspan></text> | ||
626 | </g> | ||
627 | <g | ||
628 | id="g3466" | ||
629 | transform="matrix(0.62334353,0,0,0.61679464,362.76112,566.60858)"> | ||
630 | <rect | ||
631 | y="119.99139" | ||
632 | x="198.49498" | ||
633 | height="60.609154" | ||
634 | width="66.670067" | ||
635 | id="rect3468" | ||
636 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" /> | ||
637 | <text | ||
638 | sodipodi:linespacing="125%" | ||
639 | id="text3470" | ||
640 | y="160.39748" | ||
641 | x="206.07112" | ||
642 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
643 | xml:space="preserve"><tspan | ||
644 | y="160.39748" | ||
645 | x="206.07112" | ||
646 | id="tspan3472" | ||
647 | sodipodi:role="line">API</tspan></text> | ||
648 | </g> | ||
649 | <path | ||
650 | style="fill:#5fd35f;fill-opacity:1;stroke:#faf6a2;stroke-width:1.11993289;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
651 | d="m 420.2626,707.53388 180.11119,0 0,124.61741 -180.11119,0 z" | ||
652 | id="path3490" | ||
653 | inkscape:connector-curvature="0" /> | ||
654 | <g | ||
655 | transform="matrix(0.62334353,0,0,0.61679464,62.665728,566.60858)" | ||
656 | id="g3492"> | ||
657 | <rect | ||
658 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
659 | id="rect3494" | ||
660 | width="66.670067" | ||
661 | height="60.609154" | ||
662 | x="198.49498" | ||
663 | y="119.99139" /> | ||
664 | <text | ||
665 | xml:space="preserve" | ||
666 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
667 | x="206.07112" | ||
668 | y="160.39748" | ||
669 | id="text3496" | ||
670 | sodipodi:linespacing="125%"><tspan | ||
671 | sodipodi:role="line" | ||
672 | id="tspan3498" | ||
673 | x="206.07112" | ||
674 | y="160.39748">API</tspan></text> | ||
675 | </g> | ||
676 | <path | ||
677 | inkscape:connector-curvature="0" | ||
678 | id="path3500" | ||
679 | d="m 116.52597,707.54132 177.63643,0 0,124.61741 -177.63643,0 z" | ||
680 | style="fill:#5fd35f;fill-opacity:1;stroke:#faf6a2;stroke-width:1.11221218;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" /> | ||
681 | <path | ||
682 | style="fill:#5fd35f;fill-opacity:1;stroke:#faf6a2;stroke-width:0.92545629;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
683 | d="m 295.65636,707.63061 122.98965,0 0,124.61741 -122.98965,0 z" | ||
684 | id="path3502" | ||
685 | inkscape:connector-curvature="0" /> | ||
686 | <text | ||
687 | xml:space="preserve" | ||
688 | style="font-size:22.32217598px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
689 | x="162.54019" | ||
690 | y="779.76184" | ||
691 | id="text3508" | ||
692 | sodipodi:linespacing="125%" | ||
693 | transform="scale(1.0052948,0.9947331)"><tspan | ||
694 | sodipodi:role="line" | ||
695 | id="tspan3510" | ||
696 | x="162.54019" | ||
697 | y="779.76184">Service</tspan></text> | ||
698 | <text | ||
699 | sodipodi:linespacing="125%" | ||
700 | id="text3512" | ||
701 | y="779.7619" | ||
702 | x="313.56918" | ||
703 | style="font-size:22.32217598px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
704 | xml:space="preserve" | ||
705 | transform="scale(1.0052948,0.9947331)"><tspan | ||
706 | y="779.7619" | ||
707 | x="313.56918" | ||
708 | id="tspan3514" | ||
709 | sodipodi:role="line">Service</tspan></text> | ||
710 | <text | ||
711 | xml:space="preserve" | ||
712 | style="font-size:22.32217598px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
713 | x="465.48401" | ||
714 | y="779.7619" | ||
715 | id="text3516" | ||
716 | sodipodi:linespacing="125%" | ||
717 | transform="scale(1.0052948,0.9947331)"><tspan | ||
718 | sodipodi:role="line" | ||
719 | id="tspan3518" | ||
720 | x="465.48401" | ||
721 | y="779.7619">Service</tspan></text> | ||
722 | <rect | ||
723 | style="fill:#c87137;fill-opacity:1;stroke:#c48069;stroke-width:0.91063529;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
724 | id="rect3520" | ||
725 | width="122.86946" | ||
726 | height="29.53463" | ||
727 | x="295.75125" | ||
728 | y="678.1521" /> | ||
729 | <rect | ||
730 | y="678.1521" | ||
731 | x="420.27423" | ||
732 | height="29.53463" | ||
733 | width="179.80205" | ||
734 | id="rect3522" | ||
735 | style="fill:#c87137;fill-opacity:1;stroke:#c48069;stroke-width:1.10158956;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" /> | ||
736 | </g> | ||
737 | </svg> | ||
diff --git a/doc/images/service_lego_block.svg b/doc/images/service_lego_block.svg new file mode 100644 index 000000000..ef0d0234f --- /dev/null +++ b/doc/images/service_lego_block.svg | |||
@@ -0,0 +1,345 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | <!-- Created with Inkscape (http://www.inkscape.org/) --> | ||
3 | |||
4 | <svg | ||
5 | xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" | ||
6 | xmlns:dc="http://purl.org/dc/elements/1.1/" | ||
7 | xmlns:cc="http://creativecommons.org/ns#" | ||
8 | xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | ||
9 | xmlns:svg="http://www.w3.org/2000/svg" | ||
10 | xmlns="http://www.w3.org/2000/svg" | ||
11 | xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | ||
12 | xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | ||
13 | width="744.09448819" | ||
14 | height="1052.3622047" | ||
15 | id="svg2" | ||
16 | version="1.1" | ||
17 | inkscape:version="0.48.2 r9819" | ||
18 | sodipodi:docname="Lego block 3.svg"> | ||
19 | <defs | ||
20 | id="defs4"> | ||
21 | <linearGradient | ||
22 | id="linearGradient6602"> | ||
23 | <stop | ||
24 | style="stop-color:#df8060;stop-opacity:1;" | ||
25 | offset="0" | ||
26 | id="stop6604" /> | ||
27 | <stop | ||
28 | style="stop-color:#df8002;stop-opacity:0;" | ||
29 | offset="1" | ||
30 | id="stop6606" /> | ||
31 | </linearGradient> | ||
32 | <linearGradient | ||
33 | id="linearGradient4392" | ||
34 | osb:paint="solid"> | ||
35 | <stop | ||
36 | style="stop-color:#faf6a6;stop-opacity:1;" | ||
37 | offset="0" | ||
38 | id="stop4394" /> | ||
39 | </linearGradient> | ||
40 | <inkscape:perspective | ||
41 | sodipodi:type="inkscape:persp3d" | ||
42 | inkscape:vp_x="883.99395 : 559.99673 : 1" | ||
43 | inkscape:vp_y="13.319386 : 993.87659 : 0" | ||
44 | inkscape:vp_z="285.3157 : 504.79962 : 1" | ||
45 | inkscape:persp3d-origin="481.39556 : 281.96355 : 1" | ||
46 | id="perspective3070" /> | ||
47 | <inkscape:perspective | ||
48 | sodipodi:type="inkscape:persp3d" | ||
49 | inkscape:vp_x="76.097926 : 349.87282 : 1" | ||
50 | inkscape:vp_y="-13.319386 : 979.366 : 0" | ||
51 | inkscape:vp_z="752.55793 : 376.31441 : 1" | ||
52 | inkscape:persp3d-origin="373.64045 : 350.98006 : 1" | ||
53 | id="perspective3012" /> | ||
54 | </defs> | ||
55 | <sodipodi:namedview | ||
56 | id="base" | ||
57 | pagecolor="#ffffff" | ||
58 | bordercolor="#666666" | ||
59 | borderopacity="1.0" | ||
60 | inkscape:pageopacity="0.0" | ||
61 | inkscape:pageshadow="2" | ||
62 | inkscape:zoom="0.49497475" | ||
63 | inkscape:cx="385.59974" | ||
64 | inkscape:cy="826.03166" | ||
65 | inkscape:document-units="px" | ||
66 | inkscape:current-layer="layer1" | ||
67 | showgrid="false" | ||
68 | inkscape:window-width="1366" | ||
69 | inkscape:window-height="721" | ||
70 | inkscape:window-x="-2" | ||
71 | inkscape:window-y="-3" | ||
72 | inkscape:window-maximized="1" /> | ||
73 | <metadata | ||
74 | id="metadata7"> | ||
75 | <rdf:RDF> | ||
76 | <cc:Work | ||
77 | rdf:about=""> | ||
78 | <dc:format>image/svg+xml</dc:format> | ||
79 | <dc:type | ||
80 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | ||
81 | <dc:title></dc:title> | ||
82 | </cc:Work> | ||
83 | </rdf:RDF> | ||
84 | </metadata> | ||
85 | <g | ||
86 | inkscape:label="Layer 1" | ||
87 | inkscape:groupmode="layer" | ||
88 | id="layer1"> | ||
89 | <path | ||
90 | style="fill:#ffdd55;fill-opacity:1;stroke:#faf6a2;stroke-width:2.26315212;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
91 | d="m 74.934278,230.09308 453.654042,0 0,202.04036 -453.654042,0 z" | ||
92 | id="rect5973" | ||
93 | inkscape:connector-curvature="0" /> | ||
94 | <path | ||
95 | style="fill:#ffcc00;fill-opacity:1;stroke:#faf6a2;stroke-width:1.92068994;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
96 | d="m 528.67583,229.34787 55.11351,-29.34622 0,190.24271 -55.11351,41.45733 z" | ||
97 | id="rect6542" | ||
98 | inkscape:connector-curvature="0" | ||
99 | sodipodi:nodetypes="ccccc" /> | ||
100 | <rect | ||
101 | style="fill:#d38d5f;fill-opacity:1;stroke:#c48069;stroke-width:2.2674458;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
102 | id="rect6557" | ||
103 | width="454.54535" | ||
104 | height="49.497475" | ||
105 | x="74.764442" | ||
106 | y="180.60052" /> | ||
107 | <path | ||
108 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:0.8206054;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
109 | d="m 528.30981,180.60052 55.47954,-27.27412 0,46.46702 -55.47954,29.29442 z" | ||
110 | id="rect6561" | ||
111 | inkscape:connector-curvature="0" | ||
112 | sodipodi:nodetypes="ccccc" /> | ||
113 | <path | ||
114 | sodipodi:nodetypes="ccccc" | ||
115 | inkscape:connector-curvature="0" | ||
116 | id="path6564" | ||
117 | d="m 528.30981,180.72501 55.03773,-27.7723 0,47.31578 -55.03773,29.8295 z" | ||
118 | style="fill:#d38d5f;fill-opacity:1;stroke:#faf6a2;stroke-width:0.82476228;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
119 | inkscape:transform-center-x="-70.147578" | ||
120 | inkscape:transform-center-y="15.429055" /> | ||
121 | <path | ||
122 | style="fill:#deaa87;fill-opacity:1;stroke:#faf6a2;stroke-width:2.23265362;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
123 | d="m 153.39374,154.33657 430.4643,-1.01015 -54.4837,27.27411 -453.213248,0 z" | ||
124 | id="rect6568" | ||
125 | inkscape:connector-curvature="0" | ||
126 | sodipodi:nodetypes="ccccc" /> | ||
127 | <text | ||
128 | xml:space="preserve" | ||
129 | style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
130 | x="352.03815" | ||
131 | y="-190.12544" | ||
132 | id="text6623" | ||
133 | sodipodi:linespacing="125%"><tspan | ||
134 | sodipodi:role="line" | ||
135 | id="tspan6625" | ||
136 | x="352.03815" | ||
137 | y="-190.12544" /></text> | ||
138 | <text | ||
139 | xml:space="preserve" | ||
140 | style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
141 | x="338.40109" | ||
142 | y="-300.73715" | ||
143 | id="text6627" | ||
144 | sodipodi:linespacing="125%"><tspan | ||
145 | sodipodi:role="line" | ||
146 | id="tspan6629" | ||
147 | x="338.40109" | ||
148 | y="-300.73715" /></text> | ||
149 | <rect | ||
150 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
151 | id="rect6571" | ||
152 | width="66.670067" | ||
153 | height="60.609154" | ||
154 | x="198.49498" | ||
155 | y="119.99139" /> | ||
156 | <path | ||
157 | style="fill:#ff6600;fill-opacity:1;stroke:#faf6a2;stroke-width:1.98413372;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
158 | d="m 265.16503,119.45792 44.95179,-22.465406 0,57.057986 -44.95179,26.55003 z" | ||
159 | id="path6600" | ||
160 | inkscape:connector-curvature="0" | ||
161 | sodipodi:nodetypes="ccccc" /> | ||
162 | <path | ||
163 | style="fill:#ff6600;fill-opacity:1;stroke:#c48069;stroke-width:1.99687159;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
164 | d="m 243.06977,97.26295 66.86223,10e-7 -45.08135,22.728439 -66.3557,0 z" | ||
165 | id="path6617" | ||
166 | inkscape:connector-curvature="0" | ||
167 | sodipodi:nodetypes="ccccc" /> | ||
168 | <text | ||
169 | xml:space="preserve" | ||
170 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
171 | x="206.07112" | ||
172 | y="160.39748" | ||
173 | id="text6631" | ||
174 | sodipodi:linespacing="125%"><tspan | ||
175 | sodipodi:role="line" | ||
176 | id="tspan6633" | ||
177 | x="206.07112" | ||
178 | y="160.39748">API</tspan></text> | ||
179 | <rect | ||
180 | y="119.99139" | ||
181 | x="313.65237" | ||
182 | height="60.609154" | ||
183 | width="66.670067" | ||
184 | id="rect6573" | ||
185 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" /> | ||
186 | <path | ||
187 | sodipodi:nodetypes="ccccc" | ||
188 | inkscape:connector-curvature="0" | ||
189 | id="path6598" | ||
190 | d="m 379.81735,119.56755 44.95179,-22.425126 0,56.955676 -44.95179,26.50243 z" | ||
191 | style="fill:#ff6600;fill-opacity:1;stroke:#faf6a2;stroke-width:1.98235416;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" /> | ||
192 | <path | ||
193 | sodipodi:nodetypes="ccccc" | ||
194 | inkscape:connector-curvature="0" | ||
195 | id="path6615" | ||
196 | d="m 358.25117,97.26295 66.89824,10e-7 -45.10563,22.728439 -66.39143,0 z" | ||
197 | style="fill:#ff6600;fill-opacity:1;stroke:#c48069;stroke-width:1.99740911;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" /> | ||
198 | <text | ||
199 | sodipodi:linespacing="125%" | ||
200 | id="text6635" | ||
201 | y="160.39748" | ||
202 | x="322.23865" | ||
203 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
204 | xml:space="preserve"><tspan | ||
205 | y="160.39748" | ||
206 | x="322.23865" | ||
207 | id="tspan6637" | ||
208 | sodipodi:role="line">API</tspan></text> | ||
209 | <rect | ||
210 | style="fill:#ff9955;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
211 | id="rect6575" | ||
212 | width="66.670067" | ||
213 | height="60.609154" | ||
214 | x="428.80978" | ||
215 | y="119.99139" /> | ||
216 | <path | ||
217 | style="fill:#ff6600;fill-opacity:1;stroke:#faf6a2;stroke-width:1.98960423;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
218 | d="m 494.97474,119.62537 44.95179,-22.589454 0,57.373054 -44.95179,26.69664 z" | ||
219 | id="rect6595" | ||
220 | inkscape:connector-curvature="0" | ||
221 | sodipodi:nodetypes="ccccc" /> | ||
222 | <path | ||
223 | style="fill:#ff6600;fill-opacity:1;stroke:#c48069;stroke-width:1.99399996;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
224 | d="m 473.25645,97.26295 66.67007,10e-7 -44.95179,22.728439 -66.16499,0 z" | ||
225 | id="rect6612" | ||
226 | inkscape:connector-curvature="0" | ||
227 | sodipodi:nodetypes="ccccc" /> | ||
228 | <text | ||
229 | xml:space="preserve" | ||
230 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
231 | x="439.41635" | ||
232 | y="159.89241" | ||
233 | id="text6639" | ||
234 | sodipodi:linespacing="125%"><tspan | ||
235 | sodipodi:role="line" | ||
236 | id="tspan6641" | ||
237 | x="439.41635" | ||
238 | y="159.89241">API</tspan></text> | ||
239 | <g | ||
240 | style="font-size:24px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
241 | id="text6643" /> | ||
242 | <text | ||
243 | xml:space="preserve" | ||
244 | style="font-size:24px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
245 | x="71.720833" | ||
246 | y="95.747719" | ||
247 | id="text6648" | ||
248 | sodipodi:linespacing="125%"><tspan | ||
249 | sodipodi:role="line" | ||
250 | id="tspan6650" | ||
251 | x="71.720833" | ||
252 | y="95.747719" /></text> | ||
253 | <text | ||
254 | xml:space="preserve" | ||
255 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
256 | x="176.77669" | ||
257 | y="216.96603" | ||
258 | id="text6652" | ||
259 | sodipodi:linespacing="125%"><tspan | ||
260 | sodipodi:role="line" | ||
261 | id="tspan6654" | ||
262 | x="176.77669" | ||
263 | y="216.96603">Network Protocol</tspan></text> | ||
264 | <text | ||
265 | xml:space="preserve" | ||
266 | style="font-size:36px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
267 | x="233.34526" | ||
268 | y="312.93051" | ||
269 | id="text6656" | ||
270 | sodipodi:linespacing="125%"><tspan | ||
271 | sodipodi:role="line" | ||
272 | id="tspan6658" | ||
273 | x="233.34526" | ||
274 | y="312.93051">Service</tspan></text> | ||
275 | <rect | ||
276 | style="fill:#ffffff;fill-opacity:1;stroke:#faf6a2;stroke-width:2.09665918;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
277 | id="rect6660" | ||
278 | width="66.670067" | ||
279 | height="66.609154" | ||
280 | x="216.67773" | ||
281 | y="371.51938" /> | ||
282 | <rect | ||
283 | y="371.51938" | ||
284 | x="322.74374" | ||
285 | height="64.373825" | ||
286 | width="66.670067" | ||
287 | id="rect6662" | ||
288 | style="fill:#ffffff;fill-opacity:1;stroke:#faf6a2;stroke-width:2.06117821;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" /> | ||
289 | <rect | ||
290 | style="fill:#ffffff;fill-opacity:1;stroke:#faf6a2;stroke-width:2;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" | ||
291 | id="rect6664" | ||
292 | width="66.670067" | ||
293 | height="60.609154" | ||
294 | x="423.75903" | ||
295 | y="372.52951" /> | ||
296 | <path | ||
297 | sodipodi:nodetypes="ccccc" | ||
298 | inkscape:connector-curvature="0" | ||
299 | id="path6666" | ||
300 | d="m 423.61996,372.56359 67.23534,-0.62641 0,19.59587 -68.24549,41.17879 z" | ||
301 | style="fill:#ffcc00;fill-opacity:1;stroke:#faf6a2;stroke-width:0.98368376;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" /> | ||
302 | <path | ||
303 | style="fill:#ffcc00;fill-opacity:1;stroke:#faf6a2;stroke-width:0.98368376;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
304 | d="m 322.60471,371.55344 67.23534,0.38374 0,23.63648 -67.23534,37.13818 z" | ||
305 | id="path6668" | ||
306 | inkscape:connector-curvature="0" | ||
307 | sodipodi:nodetypes="ccccc" /> | ||
308 | <path | ||
309 | sodipodi:nodetypes="ccccc" | ||
310 | inkscape:connector-curvature="0" | ||
311 | id="path6670" | ||
312 | d="m 322.60471,371.55344 67.23534,0.38374 0,23.63648 -67.23534,37.13818 z" | ||
313 | style="fill:#ffcc00;fill-opacity:1;stroke:#faf6a2;stroke-width:0.98368376;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" /> | ||
314 | <path | ||
315 | style="fill:#ffcc00;fill-opacity:1;stroke:#faf6a2;stroke-width:0.98368376;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" | ||
316 | d="m 216.53869,371.55344 67.23534,0.38374 0,23.63648 -67.23534,37.13818 z" | ||
317 | id="path6672" | ||
318 | inkscape:connector-curvature="0" | ||
319 | sodipodi:nodetypes="ccccc" /> | ||
320 | <text | ||
321 | xml:space="preserve" | ||
322 | style="font-size:32px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans" | ||
323 | x="262.63965" | ||
324 | y="666.48389" | ||
325 | id="text6711" | ||
326 | sodipodi:linespacing="125%"><tspan | ||
327 | sodipodi:role="line" | ||
328 | id="tspan6713" | ||
329 | x="262.63965" | ||
330 | y="666.48389" /></text> | ||
331 | <rect | ||
332 | y="371.51938" | ||
333 | x="111.62187" | ||
334 | height="70.798637" | ||
335 | width="66.670067" | ||
336 | id="rect6721" | ||
337 | style="fill:#ffffff;fill-opacity:1;stroke:#faf6a2;stroke-width:2.1615901;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dasharray:none;stroke-dashoffset:0" /> | ||
338 | <path | ||
339 | sodipodi:nodetypes="ccccc" | ||
340 | inkscape:connector-curvature="0" | ||
341 | id="path6723" | ||
342 | d="m 111.48283,370.54329 67.23534,0.38374 0,23.63648 -67.23534,37.13818 z" | ||
343 | style="fill:#ffcc00;fill-opacity:1;stroke:#faf6a2;stroke-width:0.98368376;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-opacity:0;stroke-dashoffset:0" /> | ||
344 | </g> | ||
345 | </svg> | ||
diff --git a/doc/outdated-and-old-installation-instructions.txt b/doc/outdated-and-old-installation-instructions.txt new file mode 100644 index 000000000..f2cbe1847 --- /dev/null +++ b/doc/outdated-and-old-installation-instructions.txt | |||
@@ -0,0 +1,672 @@ | |||
1 | # This file contains pieces from chapter/installation.texi for systems where the LTS or otherwise support | ||
2 | # ended. They can be useful for people trying to write new installation instructions for those systems. | ||
3 | # In particual this covers: | ||
4 | # - FreeBSD 8 | ||
5 | # - Mac OS X Tiger | ||
6 | # - Fedora 8 | ||
7 | # - Gentoo with GNUnet 0.9 | ||
8 | # | ||
9 | # Sources for LTS and support ranges: | ||
10 | # https://www.freebsd.org/security/security.html#sup | ||
11 | # https://support.microsoft.com/en-us/help/17140/lifecycle-faq-general-policy-questions | ||
12 | # Mac products, OS is supposedly similar (no official statements exist): https://web.archive.org/web/20160706101225/https://support.apple.com/en-us/HT201624 | ||
13 | # https://wiki.debian.org/LTS | ||
14 | # https://www.ubuntu.com/info/release-end-of-life | ||
15 | |||
16 | @node Build instructions for Gentoo | ||
17 | @subsection Build instructions for Gentoo | ||
18 | |||
19 | |||
20 | This page describes how to install GNUnet 0.9 on Gentoo. | ||
21 | |||
22 | Since the GNUnet 0.9 ebuilds are not in the official portage tree yet, we need | ||
23 | to add them to the local portage overlay. All the commands below should be | ||
24 | executed as root. | ||
25 | |||
26 | Specify your local portage directory in the /etc/make.conf, for example:@ | ||
27 | @code{$ echo 'PORTDIR_OVERLAY="/usr/local/portage"' >> /etc/make.conf} | ||
28 | |||
29 | Create directories for the ebuilds:@ | ||
30 | @code{$ mkdir -p /usr/local/portage/media-libs/libextractor /usr/local/portage/net-p2p/gnunet/files} | ||
31 | |||
32 | Download the latest ebuilds, init and config files from here and put them into | ||
33 | respective directories:@ | ||
34 | @code{$ cp libextractor-0.6.2.ebuild /usr/local/portage/media-libs/libextractor@ | ||
35 | $ cp gnunet-0.9.2.ebuild /usr/local/portage/net-p2p/gnunet@ | ||
36 | $ cp gnunet-0.9.2.conf gnunet-0.9.2.confd gnunet-0.9.2.initd /usr/local/portage/net-p2p/gnunet/files} | ||
37 | |||
38 | Generate Manifest files for the ebuilds:@ | ||
39 | @code{$ cd /usr/local/portage/net-p2p/gnunet@ | ||
40 | $ ebuild gnunet-0.9.2.ebuild digest@ | ||
41 | $ cd /usr/local/portage/media-libs/libextractor@ | ||
42 | $ ebuild libextractor-0.6.2.ebuild digest} | ||
43 | |||
44 | Unmask GNUnet and dependencies in the /etc/portage/package.keywords. For | ||
45 | example, if you use x86-64 architecture, add the following lines:@ | ||
46 | @code{net-p2p/gnunet ~amd64@ | ||
47 | media-libs/libextractor ~amd64@ | ||
48 | net-libs/libmicrohttpd ~amd64@ | ||
49 | net-misc/curl ~amd64} | ||
50 | |||
51 | Add either sqlite or mysql USE-flag in the /etc/portage/package.use:@ | ||
52 | @code{net-p2p/gnunet sqlite} | ||
53 | |||
54 | Now everything is ready to install GNUnet:@ | ||
55 | @code{$ emerge -av gnunet} | ||
56 | |||
57 | Use /etc/init.d/gnunet to start/stop GNUnet. | ||
58 | |||
59 | |||
60 | |||
61 | |||
62 | @node Basic Installation for Fedora/PlanetLab nodes running Fedora 8 . | ||
63 | @subsection Basic Installation for Fedora/PlanetLab nodes running Fedora 8 . | ||
64 | @c %**end of header | ||
65 | |||
66 | @strong{This documentation is outdated and not valid for GNUnet 0.10.0!}@ | ||
67 | GNUnet installation on Fedora 8/Planetlab nodes can be done as following: | ||
68 | |||
69 | 1. Install the build tools to build GNUnet@ | ||
70 | @example | ||
71 | sudo yum -y -t --nogpgcheck install gcc make automake autoconf gettext-devel \ | ||
72 | texinfo zlib-devel subversion@ | ||
73 | @end example | ||
74 | |||
75 | 2. Install the GNUnet dependencies@ | ||
76 | @example | ||
77 | sudo yum -y -t --nogpgcheck install gnutls-devel gnutls-devel libgcrypt-devel \ | ||
78 | sqlite-devel postgresql-devel mysql-devel libgsf-devel libvorbis-devel \ | ||
79 | libidn-devel | ||
80 | @end example | ||
81 | |||
82 | 3. Install outdated dependencies from source@ | ||
83 | libtool@ | ||
84 | @code{@ | ||
85 | wget http://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz@ | ||
86 | tar xvfz libtool-2.4.2.tar.gz@ | ||
87 | cd libtool-2.4.2@ | ||
88 | ./configure@ | ||
89 | sudo make install@ | ||
90 | } | ||
91 | |||
92 | libtool@ | ||
93 | @code{@ | ||
94 | wget http://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz@ | ||
95 | tar xvfz libtool-2.4.2.tar.gz@ | ||
96 | cd libtool-2.4.2@ | ||
97 | ./configure@ | ||
98 | sudo make install@ | ||
99 | } | ||
100 | |||
101 | glpk@ | ||
102 | @code{@ | ||
103 | wget http://ftp.gnu.org/gnu/glpk/glpk-4.47.tar.gz@ | ||
104 | tar xvfz glpk-4.47.tar.gz@ | ||
105 | cd glpk-4.47@ | ||
106 | ./configure@ | ||
107 | sudo make install@ | ||
108 | } | ||
109 | |||
110 | libgpg-error@ | ||
111 | @code{@ | ||
112 | wget ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.10.tar.bz2@ | ||
113 | tar xvfj libgpg-error-1.10.tar.bz2@ | ||
114 | cd libgpg-error-1.10@ | ||
115 | ./configure --prefix=/usr@ | ||
116 | sudo make install@ | ||
117 | } | ||
118 | |||
119 | libgcrypt@ | ||
120 | @code{@ | ||
121 | wget ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.5.0.tar.bz2@ | ||
122 | tar xvfj libgcrypt-1.5.0.tar.tar.bz2@ | ||
123 | cd libgcrypt-1.5.0@ | ||
124 | ./configure --prefix=/usr@ | ||
125 | sudo make install@ | ||
126 | } | ||
127 | |||
128 | libcurl@ | ||
129 | @code{@ | ||
130 | wget http://curl.haxx.se/download/curl-7.26.0.tar.gz@ | ||
131 | tar xvfz curl-7.26.0.tar.gz@ | ||
132 | cd curl-7.26.0@ | ||
133 | ./configure@ | ||
134 | sudo make install@ | ||
135 | } | ||
136 | |||
137 | libunistring@ | ||
138 | @code{@ | ||
139 | wget http://ftp.gnu.org/gnu/libunistring/libunistring-0.9.3.tar.gz@ | ||
140 | tar xvfz libunistring-0.9.3.tar.gz@ | ||
141 | cd libunistring-0.9.3@ | ||
142 | ./configure@ | ||
143 | sudo make install@ | ||
144 | } | ||
145 | |||
146 | 4. Remove conflicting packages@ | ||
147 | @code{@ | ||
148 | sudo rpm -e --nodeps libgcrypt libgpg-error@ | ||
149 | } | ||
150 | |||
151 | 4. Install libextractor@ | ||
152 | @code{@ | ||
153 | wget ftp://ftp.gnu.org/gnu/libextractor/libextractor-0.6.3.tar.gz@ | ||
154 | tar xvfz libextractor-0.6.3.tar.gz@ | ||
155 | cd libextractor-0.6.3@ | ||
156 | ./configure@ | ||
157 | sudo make install@ | ||
158 | } | ||
159 | |||
160 | 5. Install libmicrohttpd and dependencies | ||
161 | |||
162 | nettle@ | ||
163 | @code{@ | ||
164 | wget http://ftp.gnu.org/gnu/nettle/nettle-2.5.tar.gz@ | ||
165 | tar xvfz nettle-2.5.tar.gz@ | ||
166 | cd nettle-2.5@ | ||
167 | ./configure@ | ||
168 | sudo make install@ | ||
169 | } | ||
170 | |||
171 | GnuTLS@ | ||
172 | @code{@ | ||
173 | wget http://ftp.gnu.org/gnu/gnutls/gnutls-2.12.20.tar.bz2@ | ||
174 | tar xvfj gnutls-2.12.20.tar.bz2@ | ||
175 | cd gnutls-2.12.20@ | ||
176 | ./configure --without-p11-kit@ | ||
177 | sudo make install@ | ||
178 | } | ||
179 | |||
180 | libmicrohttpd@ | ||
181 | @code{@ | ||
182 | wget ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.21.tar.gz@ | ||
183 | tar xvfz libmicrohttpd-0.9.21.tar.gz@ | ||
184 | cd libmicrohttpd-0.9.21@ | ||
185 | ./configure@ | ||
186 | sudo make install@ | ||
187 | } | ||
188 | |||
189 | 6. Set GNUnet prefix and add to PATH@ | ||
190 | @code{@ | ||
191 | export GNUNET_PREFIX=@ | ||
192 | export PATH=$PATH:$GNUNET_PREFIX/bin@ | ||
193 | } | ||
194 | |||
195 | 7. Install GNUnet from svn@ | ||
196 | @example | ||
197 | export LD_LIBRARY_PATH=/usr/local/lib@ | ||
198 | svn co https://gnunet.org/svn/gnunet@ | ||
199 | cd gnunet@ | ||
200 | libtoolize@ | ||
201 | ./bootstrap@ | ||
202 | ./configure --prefix=$GNUNET_PREFIX --with-extractor=/usr/local \ | ||
203 | --with-curl=/usr/local --with-mysql=/usr/lib/mysql --enable-logging=verbose@ | ||
204 | make install@ | ||
205 | @end example | ||
206 | |||
207 | Done! | ||
208 | |||
209 | |||
210 | @node Build instructions for FreeBSD 8 | ||
211 | @subsection Build instructions for FreeBSD 8 | ||
212 | |||
213 | To get GNUnet 0.9 to compile on FreeBSD (at least FreeBSD 8.0):@ in order to | ||
214 | install the library @code{libiconv}, at first change the directory to your | ||
215 | ports directory, e.g.@ | ||
216 | @code{@ | ||
217 | $ cd /usr/ports/@ | ||
218 | }@ | ||
219 | following that, go to the install file of @code{libiconv} and install it,@ | ||
220 | @code{@ | ||
221 | $ cd converters/libiconv,@ | ||
222 | $ make install@ | ||
223 | } | ||
224 | |||
225 | after that, change the directory to where you will check out | ||
226 | @code{libextractor} and GNUnet, and install latest @code{libextractor},@ | ||
227 | first of all, checkout @code{libextractor}, e.g.@ | ||
228 | @code{@ | ||
229 | $ svn co https://gnunet.org/svn/Extractor@ | ||
230 | }@ | ||
231 | then change the directory into which it was checked out, e.g.@ | ||
232 | @code{@ | ||
233 | $ cd Extractor@ | ||
234 | }@ | ||
235 | before the installation, you should do following steps,@ | ||
236 | |||
237 | @example | ||
238 | $ ./bootstrap@ | ||
239 | $ ./configure --with-ltdl-include=/usr/local/include \ | ||
240 | --with-ltdl-lib=/usr/local/lib@ | ||
241 | @end example | ||
242 | |||
243 | if these steps complete successfully, you can install the library,@ | ||
244 | |||
245 | @example | ||
246 | $ make install@ | ||
247 | @end example | ||
248 | |||
249 | to check out the GNUnet, you should do the similar steps as | ||
250 | @code{libextractor}, firstly, change back to starting directory, e.g.@ | ||
251 | @code{@ | ||
252 | $ cd ../@ | ||
253 | }@ | ||
254 | Set the following environmental variables:@ | ||
255 | @code{@ | ||
256 | export CPPFLAGS="-I/usr/local/include"@ | ||
257 | export LDFLAGS="-L/usr/local/lib"@ | ||
258 | }@ | ||
259 | next, checkout GNUnet using@ | ||
260 | @code{@ | ||
261 | $ svn co https://gnunet.org/svn/gnunet@ | ||
262 | }@ | ||
263 | then change directory into newly checked out directory,@ | ||
264 | @code{@ | ||
265 | $ cd gnunet@ | ||
266 | }@ | ||
267 | at last, start to install GNUnet,@ | ||
268 | |||
269 | @example | ||
270 | $ ./bootstrap@ | ||
271 | $ ./configure --with-ltdl-include=/usr/local/include \ | ||
272 | --with-ltdl-lib=/usr/local/lib --with-extractor=/usr/local | ||
273 | |||
274 | ## NOTE: you may not need the --with-extractor option!@ | ||
275 | |||
276 | $ make install | ||
277 | @end example | ||
278 | |||
279 | |||
280 | |||
281 | @node Basic installation for Mac OS X | ||
282 | @subsection Basic installation for Mac OS X | ||
283 | |||
284 | This documentation may be outdated! | ||
285 | |||
286 | This page is providing guidelines for users trying to install GNUnet on Mac OS | ||
287 | X.@ Mainly users trying to install GNUnet by building source code are the most | ||
288 | welcome readers.@ The steps below are tested on an Intel Architecture running | ||
289 | Mac OS X Tiger (10.4.11). Ideally they should work on other Mac boxes with | ||
290 | different configurations as all the configuration done for it is dependent on | ||
291 | @uref{http://www.macports.org/, MacPorts} | ||
292 | |||
293 | For having GNUnet installed successfully, some dependencies should be firstly | ||
294 | resolved: | ||
295 | |||
296 | @itemize @bullet | ||
297 | |||
298 | @item | ||
299 | Install/Update your @uref{http://developer.apple.com/tools/xcode/, Xcode} | ||
300 | version 3.2.1 or later for Snow Leopard, 3.1.4 or later for Leopard, or 2.5 for | ||
301 | Tiger. | ||
302 | |||
303 | @item | ||
304 | Download and install @uref{http://www.macports.org/, MacPorts}.@ | ||
305 | Now you are ready for installing GNunet dependencies. | ||
306 | |||
307 | @item | ||
308 | First, you'd better make sure that: /opt/local/bin and /opt/local/sbin are | ||
309 | available in your PATH. (For doing so, open a terminal and type:@ | ||
310 | |||
311 | @example | ||
312 | $ echo $PATH | ||
313 | @end example | ||
314 | |||
315 | and examine the output of it). If the paths are not available in your | ||
316 | environment, you have to add them (You can add them by editing your .profile | ||
317 | file in your home directory, append them to the PATH line). Then type: | ||
318 | @example | ||
319 | $ source ~/.profile | ||
320 | @end example | ||
321 | |||
322 | and re-examine the echo command output. | ||
323 | |||
324 | @item | ||
325 | Use MacPorts to download and install the dependencies:@ | ||
326 | The libraries are: | ||
327 | |||
328 | @itemize @bullet | ||
329 | |||
330 | @item | ||
331 | @uref{http://trac.macports.org/browser/trunk/dports/www/libmicrohttpd/Portfile, libmicrohttpd.} | ||
332 | |||
333 | @item | ||
334 | @uref{http://trac.macports.org/browser/trunk/dports/devel/libgcrypt/Portfile, libgcrypt.} | ||
335 | |||
336 | @item | ||
337 | @uref{http://trac.macports.org/browser/trunk/dports/net/curl/Portfile, libcurl.} | ||
338 | |||
339 | @item | ||
340 | @uref{http://trac.macports.org/browser/trunk/dports/devel/libtool/Portfile, libltdl.} | ||
341 | |||
342 | @item | ||
343 | @uref{http://trac.macports.org/browser/trunk/dports/databases/sqlite3/Portfile, SQlite.} | ||
344 | |||
345 | @item | ||
346 | libunistring | ||
347 | |||
348 | @item | ||
349 | glpk | ||
350 | |||
351 | @end itemize | ||
352 | |||
353 | The port command is as follows:@ | ||
354 | @example | ||
355 | port install libmicrohttpd libgcrypt curl libtool sqlite3 linunistring glpk | ||
356 | @end example | ||
357 | One of the dependencies, the libextractor, should be explicitly installed, | ||
358 | since the version available from macports is outdated to work with GNUnet. To | ||
359 | install the latest libextractor: | ||
360 | @itemize @bullet | ||
361 | |||
362 | |||
363 | @item | ||
364 | Install the Subversion Client:@ | ||
365 | For more information about Subversion visit: | ||
366 | @uref{http://subversion.tigris.org/, http://subversion.tigris.org/} | ||
367 | |||
368 | @example | ||
369 | # port install subversion | ||
370 | @end example | ||
371 | |||
372 | |||
373 | @item | ||
374 | Use Subversion to download the latest Extractor: | ||
375 | @example | ||
376 | $ svn checkout https://gnunet.org/svn/Extractor | ||
377 | @end example | ||
378 | |||
379 | |||
380 | @item | ||
381 | Go to the installation directory of the Extractor, compile and install it: | ||
382 | @example | ||
383 | $ ./bootstrap | ||
384 | $ export CPPFLAGS="-I/opt/local/include" | ||
385 | $ export LDFLAGS="-L/opt/local/lib" | ||
386 | $ ./configure --prefix=/opt/local | ||
387 | $ make | ||
388 | # make install | ||
389 | @end example | ||
390 | |||
391 | @end itemize | ||
392 | |||
393 | |||
394 | @item | ||
395 | Now, your system is ready to install GNunet. If you downloaded GNUnet by | ||
396 | checking it out from svn, you should start by running the bootstrap script. | ||
397 | Open a terminal pointing to the GNUnet directory and type:@ | ||
398 | |||
399 | @example | ||
400 | $ ./bootstrap | ||
401 | @end example | ||
402 | |||
403 | |||
404 | @item | ||
405 | Run the configure script: | ||
406 | @example | ||
407 | $ export CPPFLAGS="-I/opt/local/include" | ||
408 | $ export LDFLAGS="-L/opt/local/lib" | ||
409 | $ ./configure --prefix=/tmp/gnunet_build | ||
410 | @end example | ||
411 | |||
412 | |||
413 | GNUnet will be installed in the directory /tmp/gnunet_build (Of course that | ||
414 | installation path can be changed).@ The CPPFLAGS and LDFLAGS are mentioned in | ||
415 | order to inform the compiler and the linker to lookup headers and libraries in | ||
416 | /opt/local/include and /opt/local/lib. | ||
417 | |||
418 | @item | ||
419 | Compile@ | ||
420 | |||
421 | @example | ||
422 | $ make | ||
423 | @end example | ||
424 | |||
425 | |||
426 | @item | ||
427 | Install GNUnet | ||
428 | @example | ||
429 | # make install | ||
430 | @end example | ||
431 | |||
432 | @end itemize | ||
433 | |||
434 | |||
435 | @node Basic Installation for Fedora/PlanetLab nodes running Fedora 12 | ||
436 | @subsection Basic Installation for Fedora/PlanetLab nodes running Fedora 12 | ||
437 | |||
438 | |||
439 | @strong{This documentation is outdated and not valid for GNUnet 0.10.0!}@ | ||
440 | |||
441 | GNUnet installation on Fedora 8/Planetlab nodes can be done as following: | ||
442 | |||
443 | 1. Install the build tools to build GNUnet@ | ||
444 | @example | ||
445 | sudo yum -y -t --nogpgcheck install gcc make autoconf gettext-devel \ | ||
446 | texinfo subversion@ | ||
447 | @end example | ||
448 | |||
449 | 2. Install the GNUnet dependencies@ | ||
450 | @example | ||
451 | sudo yum -y -t --nogpgcheck install libunistring-devel libunistring-devel \ | ||
452 | libgcrypt-devel zlib-devel sqlite-devel postgresql-devel mysql-devel \ | ||
453 | libgsf-devel libvorbis-devel@ | ||
454 | @end example | ||
455 | |||
456 | 3. Install outdated dependencies from source@ | ||
457 | libtool@ | ||
458 | @example | ||
459 | wget http://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz@ | ||
460 | tar xvfz libtool-2.4.2.tar.gz@ | ||
461 | cd libtool-2.4.2@ | ||
462 | ./configure@ | ||
463 | sudo make install@ | ||
464 | @end example | ||
465 | |||
466 | glpk@ | ||
467 | @example | ||
468 | wget http://ftp.gnu.org/gnu/glpk/glpk-4.47.tar.gz@ | ||
469 | tar xvfz glpk-4.47.tar.gz@ | ||
470 | cd glpk-4.47@ | ||
471 | ./configure@ | ||
472 | sudo make install@ | ||
473 | @end example | ||
474 | |||
475 | libcurl@ | ||
476 | @example | ||
477 | wget http://curl.haxx.se/download/curl-7.26.0.tar.gz@ | ||
478 | tar xvfz curl-7.26.0.tar.gz@ | ||
479 | cd curl-7.26.0@ | ||
480 | ./configure@ | ||
481 | sudo make install@ | ||
482 | @end example | ||
483 | |||
484 | 4. Install libextractor@ | ||
485 | @example | ||
486 | svn co https://gnunet.org/svn/libextractor@ | ||
487 | cd libextractor@ | ||
488 | libtoolize@ | ||
489 | ./bootstrap@ | ||
490 | ./configure@ | ||
491 | sudo make install@ | ||
492 | @end example | ||
493 | |||
494 | 5. Install libmicrohttpd@ | ||
495 | @example | ||
496 | svn co https://gnunet.org/svn/libmicrohttpd@ | ||
497 | cd libmicrohttpd@ | ||
498 | libtoolize@ | ||
499 | ./bootstrap@ | ||
500 | ./configure@ | ||
501 | sudo make install@ | ||
502 | @end example | ||
503 | |||
504 | 6. Set GNUnet prefix and add to PATH@ | ||
505 | @example | ||
506 | export GNUNET_PREFIX=@ | ||
507 | export PATH=$PATH:$GNUNET_PREFIX/bin@ | ||
508 | @end example | ||
509 | |||
510 | 7. Install GNUnet from svn@ | ||
511 | @example | ||
512 | export LD_LIBRARY_PATH=/usr/local/lib@ | ||
513 | svn co https://gnunet.org/svn/gnunet@ | ||
514 | cd gnunet@ | ||
515 | libtoolize@ | ||
516 | ./bootstrap@ | ||
517 | ./configure --prefix=$GNUNET_PREFIX --with-extractor=/usr \ | ||
518 | --with-mysql=/usr/lib/mysql --enable-logging=verbose@ | ||
519 | make install@ | ||
520 | @end example | ||
521 | |||
522 | Done! | ||
523 | |||
524 | |||
525 | @node Basic Installation for Fedora/PlanetLab nodes running Fedora 8 . | ||
526 | @subsection Basic Installation for Fedora/PlanetLab nodes running Fedora 8 . | ||
527 | @c %**end of header | ||
528 | |||
529 | @strong{This documentation is outdated and not valid for GNUnet 0.10.0!}@ | ||
530 | GNUnet installation on Fedora 8/Planetlab nodes can be done as following: | ||
531 | |||
532 | 1. Install the build tools to build GNUnet@ | ||
533 | @example | ||
534 | sudo yum -y -t --nogpgcheck install gcc make automake autoconf gettext-devel \ | ||
535 | texinfo zlib-devel subversion@ | ||
536 | @end example | ||
537 | |||
538 | 2. Install the GNUnet dependencies@ | ||
539 | @example | ||
540 | sudo yum -y -t --nogpgcheck install gnutls-devel gnutls-devel libgcrypt-devel \ | ||
541 | sqlite-devel postgresql-devel mysql-devel libgsf-devel libvorbis-devel \ | ||
542 | libidn-devel | ||
543 | @end example | ||
544 | |||
545 | 3. Install outdated dependencies from source@ | ||
546 | libtool@ | ||
547 | @code{@ | ||
548 | wget http://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz@ | ||
549 | tar xvfz libtool-2.4.2.tar.gz@ | ||
550 | cd libtool-2.4.2@ | ||
551 | ./configure@ | ||
552 | sudo make install@ | ||
553 | } | ||
554 | |||
555 | libtool@ | ||
556 | @code{@ | ||
557 | wget http://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz@ | ||
558 | tar xvfz libtool-2.4.2.tar.gz@ | ||
559 | cd libtool-2.4.2@ | ||
560 | ./configure@ | ||
561 | sudo make install@ | ||
562 | } | ||
563 | |||
564 | glpk@ | ||
565 | @code{@ | ||
566 | wget http://ftp.gnu.org/gnu/glpk/glpk-4.47.tar.gz@ | ||
567 | tar xvfz glpk-4.47.tar.gz@ | ||
568 | cd glpk-4.47@ | ||
569 | ./configure@ | ||
570 | sudo make install@ | ||
571 | } | ||
572 | |||
573 | libgpg-error@ | ||
574 | @code{@ | ||
575 | wget ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.10.tar.bz2@ | ||
576 | tar xvfj libgpg-error-1.10.tar.bz2@ | ||
577 | cd libgpg-error-1.10@ | ||
578 | ./configure --prefix=/usr@ | ||
579 | sudo make install@ | ||
580 | } | ||
581 | |||
582 | libgcrypt@ | ||
583 | @code{@ | ||
584 | wget ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-1.5.0.tar.bz2@ | ||
585 | tar xvfj libgcrypt-1.5.0.tar.tar.bz2@ | ||
586 | cd libgcrypt-1.5.0@ | ||
587 | ./configure --prefix=/usr@ | ||
588 | sudo make install@ | ||
589 | } | ||
590 | |||
591 | libcurl@ | ||
592 | @code{@ | ||
593 | wget http://curl.haxx.se/download/curl-7.26.0.tar.gz@ | ||
594 | tar xvfz curl-7.26.0.tar.gz@ | ||
595 | cd curl-7.26.0@ | ||
596 | ./configure@ | ||
597 | sudo make install@ | ||
598 | } | ||
599 | |||
600 | libunistring@ | ||
601 | @code{@ | ||
602 | wget http://ftp.gnu.org/gnu/libunistring/libunistring-0.9.3.tar.gz@ | ||
603 | tar xvfz libunistring-0.9.3.tar.gz@ | ||
604 | cd libunistring-0.9.3@ | ||
605 | ./configure@ | ||
606 | sudo make install@ | ||
607 | } | ||
608 | |||
609 | 4. Remove conflicting packages@ | ||
610 | @code{@ | ||
611 | sudo rpm -e --nodeps libgcrypt libgpg-error@ | ||
612 | } | ||
613 | |||
614 | 4. Install libextractor@ | ||
615 | @code{@ | ||
616 | wget ftp://ftp.gnu.org/gnu/libextractor/libextractor-0.6.3.tar.gz@ | ||
617 | tar xvfz libextractor-0.6.3.tar.gz@ | ||
618 | cd libextractor-0.6.3@ | ||
619 | ./configure@ | ||
620 | sudo make install@ | ||
621 | } | ||
622 | |||
623 | 5. Install libmicrohttpd and dependencies | ||
624 | |||
625 | nettle@ | ||
626 | @code{@ | ||
627 | wget http://ftp.gnu.org/gnu/nettle/nettle-2.5.tar.gz@ | ||
628 | tar xvfz nettle-2.5.tar.gz@ | ||
629 | cd nettle-2.5@ | ||
630 | ./configure@ | ||
631 | sudo make install@ | ||
632 | } | ||
633 | |||
634 | GnuTLS@ | ||
635 | @code{@ | ||
636 | wget http://ftp.gnu.org/gnu/gnutls/gnutls-2.12.20.tar.bz2@ | ||
637 | tar xvfj gnutls-2.12.20.tar.bz2@ | ||
638 | cd gnutls-2.12.20@ | ||
639 | ./configure --without-p11-kit@ | ||
640 | sudo make install@ | ||
641 | } | ||
642 | |||
643 | libmicrohttpd@ | ||
644 | @code{@ | ||
645 | wget ftp://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-0.9.21.tar.gz@ | ||
646 | tar xvfz libmicrohttpd-0.9.21.tar.gz@ | ||
647 | cd libmicrohttpd-0.9.21@ | ||
648 | ./configure@ | ||
649 | sudo make install@ | ||
650 | } | ||
651 | |||
652 | 6. Set GNUnet prefix and add to PATH@ | ||
653 | @code{@ | ||
654 | export GNUNET_PREFIX=@ | ||
655 | export PATH=$PATH:$GNUNET_PREFIX/bin@ | ||
656 | } | ||
657 | |||
658 | 7. Install GNUnet from svn@ | ||
659 | @example | ||
660 | export LD_LIBRARY_PATH=/usr/local/lib@ | ||
661 | svn co https://gnunet.org/svn/gnunet@ | ||
662 | cd gnunet@ | ||
663 | libtoolize@ | ||
664 | ./bootstrap@ | ||
665 | ./configure --prefix=$GNUNET_PREFIX --with-extractor=/usr/local \ | ||
666 | --with-curl=/usr/local --with-mysql=/usr/lib/mysql --enable-logging=verbose@ | ||
667 | make install@ | ||
668 | @end example | ||
669 | |||
670 | Done! | ||
671 | |||
672 | |||
diff --git a/doc/tutorial-examples/001.c b/doc/tutorial-examples/001.c new file mode 100644 index 000000000..7f6699dd2 --- /dev/null +++ b/doc/tutorial-examples/001.c | |||
@@ -0,0 +1,29 @@ | |||
1 | #include <gnunet/platform.h> | ||
2 | #include <gnunet/gnunet_util_lib.h> | ||
3 | |||
4 | static int ret; | ||
5 | |||
6 | static void | ||
7 | run (void *cls, | ||
8 | char *const *args, | ||
9 | const char *cfgfile, | ||
10 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
11 | { | ||
12 | // main code here | ||
13 | ret = 0; | ||
14 | } | ||
15 | |||
16 | int | ||
17 | main (int argc, char *const *argv) | ||
18 | { | ||
19 | struct GNUNET_GETOPT_CommandLineOption options[] = { | ||
20 | GNUNET_GETOPT_OPTION_END | ||
21 | }; | ||
22 | return (GNUNET_OK == | ||
23 | GNUNET_PROGRAM_run (argc, | ||
24 | argv, | ||
25 | "binary-name", | ||
26 | gettext_noop ("binary description text"), | ||
27 | options, &run, NULL)) ? ret : 1; | ||
28 | } | ||
29 | |||
diff --git a/doc/tutorial-examples/002.c b/doc/tutorial-examples/002.c new file mode 100644 index 000000000..02233fd61 --- /dev/null +++ b/doc/tutorial-examples/002.c | |||
@@ -0,0 +1,17 @@ | |||
1 | static char *string_option; | ||
2 | static int a_flag; | ||
3 | |||
4 | // ... | ||
5 | struct GNUNET_GETOPT_CommandLineOption options[] = { | ||
6 | GNUNET_GETOPT_option_string ('s', "name", "SOMESTRING", | ||
7 | gettext_noop ("text describing the string_option NAME"), | ||
8 | &string_option}, | ||
9 | GNUNET_GETOPT_option_flag ('f', "flag", | ||
10 | gettext_noop ("text describing the flag option"), | ||
11 | &a_flag), | ||
12 | GNUNET_GETOPT_OPTION_END | ||
13 | }; | ||
14 | string_option = NULL; | ||
15 | a_flag = GNUNET_SYSERR; | ||
16 | // ... | ||
17 | |||
diff --git a/doc/tutorial-examples/003.c b/doc/tutorial-examples/003.c new file mode 100644 index 000000000..d13681ca6 --- /dev/null +++ b/doc/tutorial-examples/003.c | |||
@@ -0,0 +1,7 @@ | |||
1 | struct GNUNET_MQ_MessageHandlers handlers[] = { | ||
2 | // ... | ||
3 | GNUNET_MQ_handler_end () | ||
4 | }; | ||
5 | struct GNUNET_MQ_Handle *mq; | ||
6 | |||
7 | mq = GNUNET_CLIENT_connect (cfg, "service-name", handlers, &error_cb, NULL); | ||
diff --git a/doc/tutorial-examples/004.c b/doc/tutorial-examples/004.c new file mode 100644 index 000000000..0ef007907 --- /dev/null +++ b/doc/tutorial-examples/004.c | |||
@@ -0,0 +1,5 @@ | |||
1 | struct GNUNET_MessageHeader | ||
2 | { | ||
3 | uint16_t size GNUNET_PACKED; | ||
4 | uint16_t type GNUNET_PACKED; | ||
5 | }; | ||
diff --git a/doc/tutorial-examples/005.c b/doc/tutorial-examples/005.c new file mode 100644 index 000000000..0c459f509 --- /dev/null +++ b/doc/tutorial-examples/005.c | |||
@@ -0,0 +1,8 @@ | |||
1 | struct GNUNET_MQ_Envelope *env; | ||
2 | struct GNUNET_MessageHeader *msg; | ||
3 | |||
4 | env = GNUNET_MQ_msg_extra (msg, payload_size, GNUNET_MY_MESSAGE_TYPE); | ||
5 | memcpy (&msg[1], &payload, payload_size); | ||
6 | // Send message via message queue 'mq' | ||
7 | GNUNET_mq_send (mq, env); | ||
8 | |||
diff --git a/doc/tutorial-examples/006.c b/doc/tutorial-examples/006.c new file mode 100644 index 000000000..944d2b18c --- /dev/null +++ b/doc/tutorial-examples/006.c | |||
@@ -0,0 +1,31 @@ | |||
1 | static void | ||
2 | handle_fix (void *cls, const struct MyMessage *msg) | ||
3 | { | ||
4 | // process 'msg' | ||
5 | } | ||
6 | |||
7 | static int | ||
8 | check_var (void *cls, const struct MyVarMessage *msg) | ||
9 | { | ||
10 | // check 'msg' is well-formed | ||
11 | return GNUNET_OK; | ||
12 | } | ||
13 | |||
14 | static void | ||
15 | handle_var (void *cls, const struct MyVarMessage *msg) | ||
16 | { | ||
17 | // process 'msg' | ||
18 | } | ||
19 | |||
20 | struct GNUNET_MQ_MessageHandler handlers[] = { | ||
21 | GNUNET_MQ_hd_fixed_size (fix, | ||
22 | GNUNET_MESSAGE_TYPE_MY_FIX, | ||
23 | struct MyMessage, | ||
24 | NULL), | ||
25 | GNUNET_MQ_hd_fixed_size (var, | ||
26 | GNUNET_MESSAGE_TYPE_MY_VAR, | ||
27 | struct MyVarMessage, | ||
28 | NULL), | ||
29 | |||
30 | GNUNET_MQ_handler_end () | ||
31 | }; | ||
diff --git a/doc/tutorial-examples/007.c b/doc/tutorial-examples/007.c new file mode 100644 index 000000000..096539e43 --- /dev/null +++ b/doc/tutorial-examples/007.c | |||
@@ -0,0 +1,10 @@ | |||
1 | GNUNET_SERVICE_MAIN | ||
2 | ("service-name", | ||
3 | GNUNET_SERVICE_OPTION_NONE, | ||
4 | &run, | ||
5 | &client_connect_cb, | ||
6 | &client_disconnect_cb, | ||
7 | NULL, | ||
8 | GNUNET_MQ_hd_fixed_size (...), | ||
9 | GNUNET_MQ_hd_var_size (...), | ||
10 | GNUNET_MQ_handler_end ()); | ||
diff --git a/doc/tutorial-examples/008.c b/doc/tutorial-examples/008.c new file mode 100644 index 000000000..2dffe2cf9 --- /dev/null +++ b/doc/tutorial-examples/008.c | |||
@@ -0,0 +1,22 @@ | |||
1 | static void | ||
2 | run (void *cls, | ||
3 | const struct GNUNET_CONFIGURATION_Handle *c, | ||
4 | struct GNUNET_SERVICE_Handle *service) | ||
5 | { | ||
6 | } | ||
7 | |||
8 | static void * | ||
9 | client_connect_cb (void *cls, | ||
10 | struct GNUNET_SERVICE_Client *c, | ||
11 | struct GNUNET_MQ_Handle *mq) | ||
12 | { | ||
13 | return c; | ||
14 | } | ||
15 | |||
16 | static void | ||
17 | client_disconnect_cb (void *cls, | ||
18 | struct GNUNET_SERVICE_Client *c, | ||
19 | void *internal_cls) | ||
20 | { | ||
21 | GNUNET_assert (c == internal_cls); | ||
22 | } | ||
diff --git a/doc/tutorial-examples/009.c b/doc/tutorial-examples/009.c new file mode 100644 index 000000000..26d918fb0 --- /dev/null +++ b/doc/tutorial-examples/009.c | |||
@@ -0,0 +1,9 @@ | |||
1 | #include <gnunet/gnunet_core_service.h> | ||
2 | |||
3 | struct GNUNET_CORE_Handle * | ||
4 | GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
5 | void *cls, | ||
6 | GNUNET_CORE_StartupCallback init, | ||
7 | GNUNET_CORE_ConnectEventHandler connects, | ||
8 | GNUNET_CORE_DisconnectEventHandler disconnects, | ||
9 | const struct GNUNET_MQ_MessageHandler *handlers); | ||
diff --git a/doc/tutorial-examples/010.c b/doc/tutorial-examples/010.c new file mode 100644 index 000000000..33494490d --- /dev/null +++ b/doc/tutorial-examples/010.c | |||
@@ -0,0 +1,8 @@ | |||
1 | void * | ||
2 | connects (void *cls, | ||
3 | const struct GNUNET_PeerIdentity *peer, | ||
4 | struct GNUNET_MQ_Handle *mq) | ||
5 | { | ||
6 | return mq; | ||
7 | } | ||
8 | |||
diff --git a/doc/tutorial-examples/011.c b/doc/tutorial-examples/011.c new file mode 100644 index 000000000..23bc051de --- /dev/null +++ b/doc/tutorial-examples/011.c | |||
@@ -0,0 +1,8 @@ | |||
1 | void | ||
2 | disconnects (void *cls, | ||
3 | const struct GNUNET_PeerIdentity * peer) | ||
4 | { | ||
5 | /* Remove peer's identity from known peers */ | ||
6 | /* Make sure no messages are sent to peer from now on */ | ||
7 | } | ||
8 | |||
diff --git a/doc/tutorial-examples/012.c b/doc/tutorial-examples/012.c new file mode 100644 index 000000000..cb21d78ab --- /dev/null +++ b/doc/tutorial-examples/012.c | |||
@@ -0,0 +1,4 @@ | |||
1 | #include "gnunet_peerstore_service.h" | ||
2 | |||
3 | peerstore_handle = GNUNET_PEERSTORE_connect (cfg); | ||
4 | |||
diff --git a/doc/tutorial-examples/013.c b/doc/tutorial-examples/013.c new file mode 100644 index 000000000..6792417e1 --- /dev/null +++ b/doc/tutorial-examples/013.c | |||
@@ -0,0 +1,12 @@ | |||
1 | struct GNUNET_PEERSTORE_StoreContext * | ||
2 | GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h, | ||
3 | const char *sub_system, | ||
4 | const struct GNUNET_PeerIdentity *peer, | ||
5 | const char *key, | ||
6 | const void *value, | ||
7 | size_t size, | ||
8 | struct GNUNET_TIME_Absolute expiry, | ||
9 | enum GNUNET_PEERSTORE_StoreOption options, | ||
10 | GNUNET_PEERSTORE_Continuation cont, | ||
11 | void *cont_cls); | ||
12 | |||
diff --git a/doc/tutorial-examples/014.c b/doc/tutorial-examples/014.c new file mode 100644 index 000000000..ce204f795 --- /dev/null +++ b/doc/tutorial-examples/014.c | |||
@@ -0,0 +1,9 @@ | |||
1 | struct GNUNET_PEERSTORE_IterateContext * | ||
2 | GNUNET_PEERSTORE_iterate (struct GNUNET_PEERSTORE_Handle *h, | ||
3 | const char *sub_system, | ||
4 | const struct GNUNET_PeerIdentity *peer, | ||
5 | const char *key, | ||
6 | struct GNUNET_TIME_Relative timeout, | ||
7 | GNUNET_PEERSTORE_Processor callback, | ||
8 | void *callback_cls); | ||
9 | |||
diff --git a/doc/tutorial-examples/015.c b/doc/tutorial-examples/015.c new file mode 100644 index 000000000..0dd267e8e --- /dev/null +++ b/doc/tutorial-examples/015.c | |||
@@ -0,0 +1,8 @@ | |||
1 | struct GNUNET_PEERSTORE_WatchContext * | ||
2 | GNUNET_PEERSTORE_watch (struct GNUNET_PEERSTORE_Handle *h, | ||
3 | const char *sub_system, | ||
4 | const struct GNUNET_PeerIdentity *peer, | ||
5 | const char *key, | ||
6 | GNUNET_PEERSTORE_Processor callback, | ||
7 | void *callback_cls); | ||
8 | |||
diff --git a/doc/tutorial-examples/016.c b/doc/tutorial-examples/016.c new file mode 100644 index 000000000..d8db4b3b8 --- /dev/null +++ b/doc/tutorial-examples/016.c | |||
@@ -0,0 +1,3 @@ | |||
1 | void | ||
2 | GNUNET_PEERSTORE_watch_cancel (struct GNUNET_PEERSTORE_WatchContext *wc); | ||
3 | |||
diff --git a/doc/tutorial-examples/017.c b/doc/tutorial-examples/017.c new file mode 100644 index 000000000..c4acbc088 --- /dev/null +++ b/doc/tutorial-examples/017.c | |||
@@ -0,0 +1,3 @@ | |||
1 | void | ||
2 | GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h, int sync_first); | ||
3 | |||
diff --git a/doc/tutorial-examples/018.c b/doc/tutorial-examples/018.c new file mode 100644 index 000000000..3fc22584c --- /dev/null +++ b/doc/tutorial-examples/018.c | |||
@@ -0,0 +1,2 @@ | |||
1 | dht_handle = GNUNET_DHT_connect (cfg, parallel_requests); | ||
2 | |||
diff --git a/doc/tutorial-examples/019.c b/doc/tutorial-examples/019.c new file mode 100644 index 000000000..d016d381b --- /dev/null +++ b/doc/tutorial-examples/019.c | |||
@@ -0,0 +1,15 @@ | |||
1 | message_sent_cont (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
2 | { | ||
3 | // Request has left local node | ||
4 | } | ||
5 | |||
6 | struct GNUNET_DHT_PutHandle * | ||
7 | GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, | ||
8 | const struct GNUNET_HashCode *key, | ||
9 | uint32_t desired_replication_level, | ||
10 | enum GNUNET_DHT_RouteOption options, | ||
11 | enum GNUNET_BLOCK_Type type, size_t size, const void *data, | ||
12 | struct GNUNET_TIME_Absolute exp, | ||
13 | struct GNUNET_TIME_Relative timeout, | ||
14 | GNUNET_DHT_PutContinuation cont, void *cont_cls) | ||
15 | |||
diff --git a/doc/tutorial-examples/020.c b/doc/tutorial-examples/020.c new file mode 100644 index 000000000..5ecba1c16 --- /dev/null +++ b/doc/tutorial-examples/020.c | |||
@@ -0,0 +1,24 @@ | |||
1 | static void | ||
2 | get_result_iterator (void *cls, struct GNUNET_TIME_Absolute expiration, | ||
3 | const struct GNUNET_HashCode *key, | ||
4 | const struct GNUNET_PeerIdentity *get_path, | ||
5 | unsigned int get_path_length, | ||
6 | const struct GNUNET_PeerIdentity *put_path, | ||
7 | unsigned int put_path_length, | ||
8 | enum GNUNET_BLOCK_Type type, size_t size, const void *data) | ||
9 | { | ||
10 | // Optionally: | ||
11 | GNUNET_DHT_get_stop (get_handle); | ||
12 | } | ||
13 | |||
14 | get_handle = | ||
15 | GNUNET_DHT_get_start (dht_handle, | ||
16 | block_type, | ||
17 | &key, | ||
18 | replication, | ||
19 | GNUNET_DHT_RO_NONE, | ||
20 | NULL, | ||
21 | 0, | ||
22 | &get_result_iterator, | ||
23 | cls) | ||
24 | |||
diff --git a/doc/tutorial-examples/021.c b/doc/tutorial-examples/021.c new file mode 100644 index 000000000..688a31fe0 --- /dev/null +++ b/doc/tutorial-examples/021.c | |||
@@ -0,0 +1,13 @@ | |||
1 | static enum GNUNET_BLOCK_EvaluationResult | ||
2 | block_plugin_SERVICE_evaluate (void *cls, | ||
3 | enum GNUNET_BLOCK_Type type, | ||
4 | struct GNUNET_BlockGroup *bg, | ||
5 | const GNUNET_HashCode *query, | ||
6 | const void *xquery, | ||
7 | size_t xquery_size, | ||
8 | const void *reply_block, | ||
9 | size_t reply_block_size) | ||
10 | { | ||
11 | // Verify type, block and bg | ||
12 | } | ||
13 | |||
diff --git a/doc/tutorial-examples/022.c b/doc/tutorial-examples/022.c new file mode 100644 index 000000000..a373619bd --- /dev/null +++ b/doc/tutorial-examples/022.c | |||
@@ -0,0 +1,8 @@ | |||
1 | static int | ||
2 | block_plugin_SERVICE_get_key (void *cls, enum GNUNET_BLOCK_Type type, | ||
3 | const void *block, size_t block_size, | ||
4 | struct GNUNET_HashCode *key) | ||
5 | { | ||
6 | // Store the key in the key argument, return GNUNET_OK on success. | ||
7 | } | ||
8 | |||
diff --git a/doc/tutorial-examples/023.c b/doc/tutorial-examples/023.c new file mode 100644 index 000000000..820c38b10 --- /dev/null +++ b/doc/tutorial-examples/023.c | |||
@@ -0,0 +1,17 @@ | |||
1 | void * | ||
2 | libgnunet_plugin_block_SERVICE_init (void *cls) | ||
3 | { | ||
4 | static enum GNUNET_BLOCK_Type types[] = | ||
5 | { | ||
6 | GNUNET_BLOCK_TYPE_SERVICE_BLOCKYPE, | ||
7 | GNUNET_BLOCK_TYPE_ANY | ||
8 | }; | ||
9 | struct GNUNET_BLOCK_PluginFunctions *api; | ||
10 | |||
11 | api = GNUNET_new (struct GNUNET_BLOCK_PluginFunctions); | ||
12 | api->evaluate = &block_plugin_SERICE_evaluate; | ||
13 | api->get_key = &block_plugin_SERVICE_get_key; | ||
14 | api->types = types; | ||
15 | return api; | ||
16 | } | ||
17 | |||
diff --git a/doc/tutorial-examples/024.c b/doc/tutorial-examples/024.c new file mode 100644 index 000000000..2e84b5905 --- /dev/null +++ b/doc/tutorial-examples/024.c | |||
@@ -0,0 +1,9 @@ | |||
1 | void * | ||
2 | libgnunet_plugin_block_SERVICE_done (void *cls) | ||
3 | { | ||
4 | struct GNUNET_TRANSPORT_PluginFunctions *api = cls; | ||
5 | |||
6 | GNUNET_free (api); | ||
7 | return NULL; | ||
8 | } | ||
9 | |||
diff --git a/doc/tutorial-examples/025.c b/doc/tutorial-examples/025.c new file mode 100644 index 000000000..66d4f80ec --- /dev/null +++ b/doc/tutorial-examples/025.c | |||
@@ -0,0 +1,15 @@ | |||
1 | plugindir = $(libdir)/gnunet | ||
2 | |||
3 | plugin_LTLIBRARIES = \ | ||
4 | libgnunet_plugin_block_ext.la | ||
5 | libgnunet_plugin_block_ext_la_SOURCES = \ | ||
6 | plugin_block_ext.c | ||
7 | libgnunet_plugin_block_ext_la_LIBADD = \ | ||
8 | $(prefix)/lib/libgnunethello.la \ | ||
9 | $(prefix)/lib/libgnunetblock.la \ | ||
10 | $(prefix)/lib/libgnunetutil.la | ||
11 | libgnunet_plugin_block_ext_la_LDFLAGS = \ | ||
12 | $(GN_PLUGIN_LDFLAGS) | ||
13 | libgnunet_plugin_block_ext_la_DEPENDENCIES = \ | ||
14 | $(prefix)/lib/libgnunetblock.la | ||
15 | |||
diff --git a/doc/tutorial-examples/026.c b/doc/tutorial-examples/026.c new file mode 100644 index 000000000..264e0b6b9 --- /dev/null +++ b/doc/tutorial-examples/026.c | |||
@@ -0,0 +1,52 @@ | |||
1 | static void | ||
2 | get_callback (void *cls, | ||
3 | enum GNUNET_DHT_RouteOption options, | ||
4 | enum GNUNET_BLOCK_Type type, | ||
5 | uint32_t hop_count, | ||
6 | uint32_t desired_replication_level, | ||
7 | unsigned int path_length, | ||
8 | const struct GNUNET_PeerIdentity *path, | ||
9 | const struct GNUNET_HashCode * key) | ||
10 | { | ||
11 | } | ||
12 | |||
13 | |||
14 | static void | ||
15 | get_resp_callback (void *cls, | ||
16 | enum GNUNET_BLOCK_Type type, | ||
17 | const struct GNUNET_PeerIdentity *get_path, | ||
18 | unsigned int get_path_length, | ||
19 | const struct GNUNET_PeerIdentity *put_path, | ||
20 | unsigned int put_path_length, | ||
21 | struct GNUNET_TIME_Absolute exp, | ||
22 | const struct GNUNET_HashCode * key, | ||
23 | const void *data, | ||
24 | size_t size) | ||
25 | { | ||
26 | } | ||
27 | |||
28 | |||
29 | static void | ||
30 | put_callback (void *cls, | ||
31 | enum GNUNET_DHT_RouteOption options, | ||
32 | enum GNUNET_BLOCK_Type type, | ||
33 | uint32_t hop_count, | ||
34 | uint32_t desired_replication_level, | ||
35 | unsigned int path_length, | ||
36 | const struct GNUNET_PeerIdentity *path, | ||
37 | struct GNUNET_TIME_Absolute exp, | ||
38 | const struct GNUNET_HashCode * key, | ||
39 | const void *data, | ||
40 | size_t size) | ||
41 | { | ||
42 | } | ||
43 | |||
44 | |||
45 | monitor_handle = GNUNET_DHT_monitor_start (dht_handle, | ||
46 | block_type, | ||
47 | key, | ||
48 | &get_callback, | ||
49 | &get_resp_callback, | ||
50 | &put_callback, | ||
51 | cls); | ||
52 | |||
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index 19088c5cb..2db2ba0d1 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c | |||
@@ -1833,7 +1833,21 @@ maint_child_death (void *cls) | |||
1833 | statcode, | 1833 | statcode, |
1834 | GNUNET_STRINGS_relative_time_to_string (pos->backoff, | 1834 | GNUNET_STRINGS_relative_time_to_string (pos->backoff, |
1835 | GNUNET_YES)); | 1835 | GNUNET_YES)); |
1836 | /* schedule restart */ | 1836 | { |
1837 | /* Reduce backoff based on runtime of the process, | ||
1838 | so that there is a cool-down if a process actually | ||
1839 | runs for a while. */ | ||
1840 | struct GNUNET_TIME_Relative runtime; | ||
1841 | unsigned int minutes; | ||
1842 | |||
1843 | runtime = GNUNET_TIME_absolute_get_duration (pos->restart_at); | ||
1844 | minutes = runtime.rel_value_us / GNUNET_TIME_UNIT_MINUTES.rel_value_us; | ||
1845 | if (minutes > 31) | ||
1846 | pos->backoff = GNUNET_TIME_UNIT_ZERO; | ||
1847 | else | ||
1848 | pos->backoff.rel_value_us <<= minutes; | ||
1849 | } | ||
1850 | /* schedule restart */ | ||
1837 | pos->restart_at = GNUNET_TIME_relative_to_absolute (pos->backoff); | 1851 | pos->restart_at = GNUNET_TIME_relative_to_absolute (pos->backoff); |
1838 | pos->backoff = GNUNET_TIME_STD_BACKOFF (pos->backoff); | 1852 | pos->backoff = GNUNET_TIME_STD_BACKOFF (pos->backoff); |
1839 | if (NULL != child_restart_task) | 1853 | if (NULL != child_restart_task) |
diff --git a/src/cadet/gnunet-service-cadet.c b/src/cadet/gnunet-service-cadet.c index af4cebfaa..c3e99e0eb 100644 --- a/src/cadet/gnunet-service-cadet.c +++ b/src/cadet/gnunet-service-cadet.c | |||
@@ -638,6 +638,7 @@ handle_channel_destroy (void *cls, | |||
638 | "%s tried to destroy unknown channel %X\n", | 638 | "%s tried to destroy unknown channel %X\n", |
639 | GSC_2s(c), | 639 | GSC_2s(c), |
640 | (uint32_t) ntohl (msg->ccn.channel_of_client)); | 640 | (uint32_t) ntohl (msg->ccn.channel_of_client)); |
641 | GNUNET_SERVICE_client_continue (c->client); | ||
641 | return; | 642 | return; |
642 | } | 643 | } |
643 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 644 | LOG (GNUNET_ERROR_TYPE_DEBUG, |