aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorng0 <ng0@infotropique.org>2017-09-06 09:30:43 +0000
committerng0 <ng0@infotropique.org>2017-09-06 09:30:43 +0000
commitd5224cf485343f445dead0516d991d0c5cee644b (patch)
tree34c16a5ec37641fff796a603af7188e22afdec31 /doc
parentc0445ad1258469470c2158184bee8c88ed42615b (diff)
downloadgnunet-d5224cf485343f445dead0516d991d0c5cee644b.tar.gz
gnunet-d5224cf485343f445dead0516d991d0c5cee644b.zip
doc: gnunet-c-tutorial.texi, chapters/installation.texi: fix compilation warnings.
Diffstat (limited to 'doc')
-rw-r--r--doc/chapters/installation.texi226
-rw-r--r--doc/gnunet-c-tutorial.texi41
2 files changed, 87 insertions, 180 deletions
diff --git a/doc/chapters/installation.texi b/doc/chapters/installation.texi
index a04478878..be458981f 100644
--- a/doc/chapters/installation.texi
+++ b/doc/chapters/installation.texi
@@ -49,21 +49,14 @@ These packages must be installed before a typical GNUnet installation
49can be performed: 49can be performed:
50 50
51@table @asis 51@table @asis
52@item 52@item GNU libmicrohttpd 0.9.30 or higher
53GNU libmicrohttpd 0.9.30 or higher 53@item GNU libextractor 1.0 or higher
54@item 54@item GNU libtool 2.2 or higher
55GNU libextractor 1.0 or higher 55@item GNU libunistring 0.9.1.1 or higher
56@item 56@item GNU libidn 1.0.0 or higher
57GNU libtool 2.2 or higher 57@item @uref{https://gnupg.org/software/libgcrypt/index.html, GNU libgcrypt}
58@item
59GNU libunistring 0.9.1.1 or higher
60@item
61GNU libidn 1.0.0 or higher
62@item
63@uref{https://gnupg.org/software/libgcrypt/index.html, GNU libgcrypt}
64@uref{https://gnupg.org/ftp/gcrypt/libgcrypt/, 1.6.0} or higher 58@uref{https://gnupg.org/ftp/gcrypt/libgcrypt/, 1.6.0} or higher
65@item 59@item @uref{https://gnutls.org/, GnuTLS}
66@uref{https://gnutls.org/, GnuTLS}
67@uref{https://www.gnupg.org/ftp/gcrypt/gnutls/v3.2/, 3.2.7} or higher, 60@uref{https://www.gnupg.org/ftp/gcrypt/gnutls/v3.2/, 3.2.7} or higher,
68compile with libunbound for DANE support; GnuTLS also requires GNU 61compile with libunbound for DANE support; GnuTLS also requires GNU
69nettle 2.7 (update: GnuTLS 3.2.7 appears NOT to work against GNU nettle 62nettle 2.7 (update: GnuTLS 3.2.7 appears NOT to work against GNU nettle
@@ -72,41 +65,27 @@ against nettle 2.7 and, in case you get some error on the reference to
72`rpl_strerror' being undefined, follow the instructions on@ 65`rpl_strerror' being undefined, follow the instructions on@
73@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}
74post (and the link inside it)). 67post (and the link inside it)).
75@item 68@item @uref{https://gnunet.org/gnurl, gnURL} libgnurl 7.34.0 or higher,
76@uref{https://gnunet.org/gnurl, gnURL} libgnurl 7.34.0 or higher,
77must be compiled after @code{GnuTLS} 69must be compiled after @code{GnuTLS}
78@item 70@item libglpk 4.45 or higher
79libglpk 4.45 or higher 71@item @uref{http://www.openssl.org/, OpenSSL} (binary) 1.0 or higher
80@item 72@item TeX Live 2012 or higher, optional (for gnunet-bcd)
81@uref{http://www.openssl.org/, OpenSSL} (binary) 1.0 or higher 73@item libpulse 2.0 or higher, optional (for gnunet-conversation)
82@item 74@item libopus 1.0.1 or higher, optional (for gnunet-conversation)
83TeX Live 2012 or higher, optional (for gnunet-bcd) 75@item libogg 1.3.0 or higher, optional (for gnunet-conversation)
84@item 76@item certool (binary)
85libpulse 2.0 or higher, optional (for gnunet-conversation)
86@item
87libopus 1.0.1 or higher, optional (for gnunet-conversation)
88@item
89libogg 1.3.0 or higher, optional (for gnunet-conversation)
90@item
91certool (binary)
92optional for convenient installation of the GNS proxy 77optional for convenient installation of the GNS proxy
93(available as part of Debian's libnss3-tools) 78(available as part of Debian's libnss3-tools)
94@item 79@item python-zbar 0.10 or higher, optional (for gnunet-qr)
95python-zbar 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
96@item
97libsqlite 3.8.0 or higher (note that the code will compile and often work with lower
98version numbers, but you may get subtle bugs with respect to quota management 81version numbers, but you may get subtle bugs with respect to quota management
99in certain rare cases); alternatively, MySQL or Postgres can also be installed, 82in certain rare cases); alternatively, MySQL or Postgres can also be installed,
100but those databases will require more complex configurations (not recommended 83but those databases will require more complex configurations (not recommended
101for first-time users) 84for first-time users)
102@item 85@item zlib any version we tested worked
103zlib any version we tested worked 86@item Gtk+ 3.0 or higher, optional (for gnunet-gtk)
104@item 87@item libgladeui must match Gtk+ version, optional (for gnunet-gtk)
105Gtk+ 3.0 or higher, optional (for gnunet-gtk) 88@item libqrencode 3.0 or higher, optional (for gnunet-namestore-gtk)
106@item
107libgladeui must match Gtk+ version, optional (for gnunet-gtk)
108@item
109libqrencode 3.0 or higher, optional (for gnunet-namestore-gtk)
110@end table 89@end table
111 90
112 91
@@ -147,30 +126,18 @@ In terms of internal dependencies, a minimum file-sharing system consists of
147the following GNUnet processes (in order of dependency): 126the following GNUnet processes (in order of dependency):
148 127
149@itemize @bullet 128@itemize @bullet
150@item 129@item gnunet-service-arm
151gnunet-service-arm 130@item gnunet-service-resolver (required by all)
152@item 131@item gnunet-service-statistics (required by all)
153gnunet-service-resolver (required by all) 132@item gnunet-service-peerinfo
154@item 133@item gnunet-service-transport (requires peerinfo)
155gnunet-service-statistics (required by all) 134@item gnunet-service-core (requires transport)
156@item 135@item gnunet-daemon-hostlist (requires core)
157gnunet-service-peerinfo 136@item gnunet-daemon-topology (requires hostlist, peerinfo)
158@item 137@item gnunet-service-datastore
159gnunet-service-transport (requires peerinfo) 138@item gnunet-service-dht (requires core)
160@item 139@item gnunet-service-identity
161gnunet-service-core (requires transport) 140@item gnunet-service-fs (requires identity, mesh, dht, datastore, core)
162@item
163gnunet-daemon-hostlist (requires core)
164@item
165gnunet-daemon-topology (requires hostlist, peerinfo)
166@item
167gnunet-service-datastore
168@item
169gnunet-service-dht (requires core)
170@item
171gnunet-service-identity
172@item
173gnunet-service-fs (requires identity, mesh, dht, datastore, core)
174@end itemize 141@end itemize
175 142
176 143
@@ -178,92 +145,39 @@ A minimum VPN system consists of the following GNUnet processes (in order of
178dependency): 145dependency):
179 146
180@itemize @bullet 147@itemize @bullet
181@item 148@item gnunet-service-arm
182gnunet-service-arm 149@item gnunet-service-resolver (required by all)
183 150@item gnunet-service-statistics (required by all)
184@item 151@item gnunet-service-peerinfo
185gnunet-service-resolver (required by all) 152@item gnunet-service-transport (requires peerinfo)
186 153@item gnunet-service-core (requires transport)
187@item 154@item gnunet-daemon-hostlist (requires core)
188gnunet-service-statistics (required by all) 155@item gnunet-service-dht (requires core)
189 156@item gnunet-service-mesh (requires dht, core)
190@item 157@item gnunet-service-dns (requires dht)
191gnunet-service-peerinfo 158@item gnunet-service-regex (requires dht)
192 159@item gnunet-service-vpn (requires regex, dns, mesh, dht)
193@item
194gnunet-service-transport (requires peerinfo)
195
196@item
197gnunet-service-core (requires transport)
198
199@item
200gnunet-daemon-hostlist (requires core)
201
202@item
203gnunet-service-dht (requires core)
204
205@item
206gnunet-service-mesh (requires dht, core)
207
208@item
209gnunet-service-dns (requires dht)
210
211@item
212gnunet-service-regex (requires dht)
213
214@item
215gnunet-service-vpn (requires regex, dns, mesh, dht)
216@end itemize 160@end itemize
217 161
218 162
219A minimum GNS system consists of the following GNUnet processes (in order of 163A minimum GNS system consists of the following GNUnet processes (in order of
220dependency): 164dependency):
221@itemize @bullet 165@itemize @bullet
222 166@item gnunet-service-arm
223@item 167@item gnunet-service-resolver (required by all)
224gnunet-service-arm 168@item gnunet-service-statistics (required by all)
225 169@item gnunet-service-peerinfo
226@item 170@item gnunet-service-transport (requires peerinfo)
227gnunet-service-resolver (required by all) 171@item gnunet-service-core (requires transport)
228 172@item gnunet-daemon-hostlist (requires core)
229@item 173@item gnunet-service-dht (requires core)
230gnunet-service-statistics (required by all) 174@item gnunet-service-mesh (requires dht, core)
231 175@item gnunet-service-dns (requires dht)
232@item 176@item gnunet-service-regex (requires dht)
233gnunet-service-peerinfo 177@item gnunet-service-vpn (requires regex, dns, mesh, dht)
234 178@item gnunet-service-identity
235@item 179@item gnunet-service-namestore (requires identity)
236gnunet-service-transport (requires peerinfo) 180@item gnunet-service-gns (requires vpn, dns, dht, namestore, identity)
237
238@item
239gnunet-service-core (requires transport)
240
241@item
242gnunet-daemon-hostlist (requires core)
243
244@item
245gnunet-service-dht (requires core)
246
247@item
248gnunet-service-mesh (requires dht, core)
249
250@item
251gnunet-service-dns (requires dht)
252
253@item
254gnunet-service-regex (requires dht)
255
256@item
257gnunet-service-vpn (requires regex, dns, mesh, dht)
258
259@item
260gnunet-service-identity
261
262@item
263gnunet-service-namestore (requires identity)
264
265@item
266gnunet-service-gns (requires vpn, dns, dht, namestore, identity)
267@end itemize 181@end itemize
268 182
269@node Pre-installation notes 183@node Pre-installation notes
@@ -284,21 +198,11 @@ GNU/Linux distribution requires you to install the following
284dependencies (ideally in this order): 198dependencies (ideally in this order):
285 199
286@itemize @bullet 200@itemize @bullet
287 201@item libgpgerror and libgcrypt
288@item 202@item libnettle and libunbound (possibly from distribution), GnuTLS
289libgpgerror and libgcrypt 203@item libgnurl (read the README)
290 204@item GNU libmicrohttpd
291@item 205@item GNU libextractor (make sure to first install the various mandatory and optional
292libnettle and libunbound (possibly from distribution), GnuTLS
293
294@item
295libgnurl (read the README)
296
297@item
298GNU libmicrohttpd
299
300@item
301GNU libextractor (make sure to first install the various mandatory and optional
302dependencies including development headers from your distribution) 206dependencies including development headers from your distribution)
303@end itemize 207@end itemize
304 208
diff --git a/doc/gnunet-c-tutorial.texi b/doc/gnunet-c-tutorial.texi
index 3b3e90e4f..824834c92 100644
--- a/doc/gnunet-c-tutorial.texi
+++ b/doc/gnunet-c-tutorial.texi
@@ -171,7 +171,7 @@ $ export PATH=$PATH:$PREFIX/bin
171$ echo export PATH=$PREFIX/bin:\\$PATH >> ~/.bashrc 171$ echo export PATH=$PREFIX/bin:\\$PATH >> ~/.bashrc
172$ mkdir ~/.config/ 172$ mkdir ~/.config/
173$ touch ~/.config/gnunet.conf 173$ touch ~/.config/gnunet.conf
174@example 174@end example
175 175
176@subsection Common Issues - Check your GNUnet installation 176@subsection Common Issues - Check your GNUnet installation
177 177
@@ -202,21 +202,24 @@ PASS: test_gnunet_prefix
202============= 202=============
2031 test passed 2031 test passed
204============= 204=============
205@example 205@end example
206
207 206
208@section Background: GNUnet Architecture 207@section Background: GNUnet Architecture
209 208
210GNUnet is organized in layers and services. Each service is composed of a 209GNUnet is organized in layers and services. Each service is composed of a
211main service implementation and a client library for other programs to use 210main service implementation and a client library for other programs to use
212the service's functionality, described by an API. This approach is shown in 211the service's functionality, described by an API. This approach is shown in
213figure~\ref{fig:service}. Some services provide an additional command line 212@c** FIXME: enable this once the commented block below works:
214tool to enable the user to interact with the service. 213@c** figure~\ref{fig:service}.
214Some services provide an additional command line tool to enable the user to
215interact with the service.
215 216
216Very often it is other GNUnet services that will use these APIs to build the 217Very often it is other GNUnet services that will use these APIs to build the
217higher layers of GNUnet on top of the lower ones. Each layer expands or extends 218higher layers of GNUnet on top of the lower ones. Each layer expands or extends
218the functionality of the service below (for instance, to build a mesh on top of 219the functionality of the service below (for instance, to build a mesh on top of
219a DHT). See figure ~\ref{fig:interaction} for an illustration of this approach. 220a DHT).
221@c** FXIME: See comment above.
222@c** See figure ~\ref{fig:interaction} for an illustration of this approach.
220 223
221@c \begin{figure}[!h] 224@c \begin{figure}[!h]
222@c \begin{center} 225@c \begin{center}
@@ -326,7 +329,7 @@ $ gnunet-statistics -c ~/peer1.conf -s dht # print statistics about DHT service
326@end example 329@end example
327 330
328 331
329@subsection Starting Two Peers by Hand} 332@subsection Starting Two Peers by Hand
330 333
331This section describes how to start two peers on the same machine by hand. 334This section describes how to start two peers on the same machine by hand.
332The process is rather painful, but the description is somewhat instructive. 335The process is rather painful, but the description is somewhat instructive.
@@ -351,7 +354,7 @@ $ cat $PREFIX/share/gnunet/config.d/*.conf > peer2.conf
351Now you have to edit @file{peer2.conf} and change: 354Now you have to edit @file{peer2.conf} and change:
352@itemize 355@itemize
353@item @code{GNUNET\_TEST\_HOME} under @code{PATHS} 356@item @code{GNUNET\_TEST\_HOME} under @code{PATHS}
354@tem Every (uncommented) value for ``@code{PORT}'' (add 10000) in any 357@item Every (uncommented) value for ``@code{PORT}'' (add 10000) in any
355section (the option may be commented out if @code{PORT} is 358section (the option may be commented out if @code{PORT} is
356prefixed by "\#", in this case, UNIX domain sockets are used 359prefixed by "\#", in this case, UNIX domain sockets are used
357and the PORT option does not need to be touched) 360and the PORT option does not need to be touched)
@@ -580,10 +583,10 @@ used, which is typically not needed):
580@verbatiminclude tutorial-examples/001.c 583@verbatiminclude tutorial-examples/001.c
581@end example 584@end example
582 585
583@subsection Handling command-line options} 586@subsection Handling command-line options
584 587
585Options can then be added easily by adding global variables and 588Options can then be added easily by adding global variables and
586expanding the {\tt options} array. For example, the following would 589expanding the @code{options} array. For example, the following would
587add a string-option and a binary flag (defaulting to @code{NULL} and 590add a string-option and a binary flag (defaulting to @code{NULL} and
588@code{GNUNET\_NO} respectively): 591@code{GNUNET\_NO} respectively):
589@example 592@example
@@ -609,7 +612,7 @@ more persistent P2P functions.
609Exercise: Add a few command-line options and print them inside 612Exercise: Add a few command-line options and print them inside
610of @code{run}. What happens if the user gives invalid arguments? 613of @code{run}. What happens if the user gives invalid arguments?
611 614
612@subsection Writing a Client Library} 615@subsection Writing a Client Library
613 616
614The first and most important step in writing a client library is to 617The first and most important step in writing a client library is to
615decide on an API for the library. Typical API calls include 618decide on an API for the library. Typical API calls include
@@ -630,7 +633,7 @@ Unique message types must be defined for each message struct in the
630@file{gnunet\_protocols.h} header (or an extension-specific include 633@file{gnunet\_protocols.h} header (or an extension-specific include
631file). 634file).
632 635
633@subsubsection Connecting to the Service} 636@subsubsection Connecting to the Service
634 637
635Before a client library can implement the application-specific protocol 638Before a client library can implement the application-specific protocol
636with the service, a connection must be created: 639with the service, a connection must be created:
@@ -647,7 +650,7 @@ receive from the service, and which functions handle them.
647The @code{error\_cb} is a function that is to be called whenever 650The @code{error\_cb} is a function that is to be called whenever
648there are errors communicating with the service. 651there are errors communicating with the service.
649 652
650@subsubsection Sending messages} 653@subsubsection Sending messages
651 654
652In GNUnet, messages are always sent beginning with a @code{struct GNUNET\_MessageHeader} 655In GNUnet, messages are always sent beginning with a @code{struct GNUNET\_MessageHeader}
653in big endian format. This header defines the size and the type of the 656in big endian format. This header defines the size and the type of the
@@ -676,7 +679,7 @@ unsigned integer (as payload) to a service using some given client
676handle. 679handle.
677 680
678 681
679@subsubsection Receiving Replies from the Service} 682@subsubsection Receiving Replies from the Service
680 683
681Clients can receive messages from the service using the handlers 684Clients can receive messages from the service using the handlers
682specified in the @code{handlers} array we specified when connecting 685specified in the @code{handlers} array we specified when connecting
@@ -700,7 +703,7 @@ should call a callback provided to your helper function's API.
700Exercise: Figure out where you can pass values to the closures (@code{cls}). 703Exercise: Figure out where you can pass values to the closures (@code{cls}).
701 704
702 705
703@subsection Writing a user interface} 706@subsection Writing a user interface
704 707
705Given a client library, all it takes to access a service now is to 708Given a client library, all it takes to access a service now is to
706combine calls to the client library with parsing command-line 709combine calls to the client library with parsing command-line
@@ -725,7 +728,7 @@ the description of the client-service protocol @file{SERVICE.h} and P2P protocol
725@file{gnunet-service-SERVICE.h} and several files for tests, including test code 728@file{gnunet-service-SERVICE.h} and several files for tests, including test code
726and configuration files. 729and configuration files.
727 730
728@subsection Starting a Service} 731@subsection Starting a Service
729 732
730The key API definition for creating a service is the @code{GNUNET\_SERVICE\_MAIN} macro: 733The key API definition for creating a service is the @code{GNUNET\_SERVICE\_MAIN} macro:
731@example 734@example
@@ -778,7 +781,7 @@ is connect to the @code{CORE} service using:
778@verbatiminclude tutorial-examples/009.c 781@verbatiminclude tutorial-examples/009.c
779@end example 782@end example
780 783
781@subsection New P2P connections} 784@subsection New P2P connections
782 785
783Before any traffic with a different peer can be exchanged, the peer must be 786Before any traffic with a different peer can be exchanged, the peer must be
784known to the service. This is notified by the @code{CORE} @code{connects} callback, 787known to the service. This is notified by the @code{CORE} @code{connects} callback,
@@ -830,7 +833,7 @@ messages lost? How can you transmit messages faster? What happens if
830you stop the peer that is receiving your messages? 833you stop the peer that is receiving your messages?
831 834
832 835
833@subsection End of P2P connections} 836@subsection End of P2P connections
834 837
835If a message handler returns @code{GNUNET\_SYSERR}, the remote peer shuts down or 838If a message handler returns @code{GNUNET\_SYSERR}, the remote peer shuts down or
836there is an unrecoverable network disconnection, CORE notifies the service that 839there is an unrecoverable network disconnection, CORE notifies the service that
@@ -865,7 +868,7 @@ The first step is to start a connection to the PEERSTORE service:
865The service handle @code{peerstore_handle} will be needed for all subsequent 868The service handle @code{peerstore_handle} will be needed for all subsequent
866PEERSTORE operations. 869PEERSTORE operations.
867 870
868@subsection Storing records} 871@subsection Storing records
869 872
870To store a new record, use the following function: 873To store a new record, use the following function:
871@example 874@example