partly fixes 0005599, other links do not have a replacement
[oweals/gnunet.git] / doc / handbook / chapters / developer.texi
index af3ac0197a3afcd43c200cd3051c3e0d7bd59bc4..79955d37ae824706eb356e6021ab0507c7ccb7c4 100644 (file)
@@ -79,6 +79,7 @@ new chapters, sections or insightful comments.
 * File-sharing (FS) Subsystem::
 * REGEX Subsystem::
 * REST Subsystem::
+* RPS Subsystem::
 @end menu
 
 @node Developer Introduction
@@ -99,8 +100,7 @@ following links:
 @c ** FIXME: Where is the Java tutorial?
 @itemize @bullet
 @item @xref{Top, Introduction,, gnunet-c-tutorial, The GNUnet C Tutorial}.
-@c broken link
-@c @item @uref{https://gnunet.org/git/gnunet.git/plain/doc/gnunet-c-tutorial.pdf, GNUnet C tutorial}
+@item @uref{https://tutorial.gnunet.org/, GNUnet C tutorial}
 @item GNUnet Java tutorial
 @end itemize
 
@@ -124,7 +124,7 @@ The public subsystems on the GNUnet server that help developers are:
 
 @item The version control system (git) keeps our code and enables
 distributed development.
-It is publicly accessible at @uref{https://gnunet.org/git/}.
+It is publicly accessible at @uref{https://git.gnunet.org/}.
 Only developers with write access can commit code, everyone else is
 encouraged to submit patches to the GNUnet-developers mailinglist:
 @uref{https://lists.gnu.org/mailman/listinfo/gnunet-developers, https://lists.gnu.org/mailman/listinfo/gnunet-developers}
@@ -133,14 +133,14 @@ encouraged to submit patches to the GNUnet-developers mailinglist:
 We use it to track feature requests, open bug reports and their
 resolutions.
 It can be accessed at
-@uref{https://gnunet.org/bugs/, https://gnunet.org/bugs/}.
+@uref{https://bugs.gnunet.org/, https://bugs.gnunet.org/}.
 Anyone can report bugs.
 
 @item Our site installation of the
 Continuous Integration (CI) system @code{Buildbot} is used
 to check GNUnet builds automatically on a range of platforms.
 The web interface of this CI is exposed at
-@uref{https://gnunet.org/buildbot/, https://gnunet.org/buildbot/}.
+@uref{https://old.gnunet.org/buildbot/, https://old.gnunet.org/buildbot/}.
 Builds are triggered automatically 30 minutes after the last commit to
 our repository was made.
 
@@ -202,7 +202,8 @@ Gtk+-based user interfaces, including:
 @item @command{gnunet-statistics-gtk} (statistics over time),
 @item @command{gnunet-peerinfo-gtk}
 (information about current connections and known peers),
-@item @command{gnunet-chat-gtk} (chat GUI) and
+@item @command{gnunet-namestore-gtk} (GNS record editor),
+@item @command{gnunet-conversation-gtk} (voice chat GUI) and
 @item @command{gnunet-setup} (setup tool for "everything")
 @end itemize
 
@@ -556,7 +557,7 @@ stacked together to construct complex buildings and it is generally easy
 to swap one block for a different one that has the same shape. GNUnet's
 architecture is based on LEGOs:
 
-@c @image{images/service_lego_block,5in,,picture of a LEGO block stack - 3 APIs as connectors upon Network Protocol on top of a Service}
+@image{images/service_lego_block,5in,,picture of a LEGO block stack - 3 APIs upon IPC/network protocol provided by a service}
 
 This chapter documents the GNUnet LEGO system, also known as GNUnet's
 system architecture.
@@ -573,10 +574,14 @@ Like services, they have holes to be filled by APIs of other services.
 Unlike services, daemons do not implement their own network protocol and
 they have no API:
 
+@image{images/daemon_lego_block,5in,,A daemon in GNUnet is a component that does not offer an API for others to build upon}
+
 The GNUnet system provides a range of services, daemons and user
 interfaces, which are then combined into a layered GNUnet instance (also
 known as a peer).
 
+@image{images/service_stack,5in,,A GNUnet peer consists of many layers of services}
+
 Note that while it is generally possible to swap one service for another
 compatible service, there is often only one implementation. However,
 during development we often have a "new" version of a service in parallel
@@ -901,12 +906,15 @@ accidental assignment) and with the @code{true} target being either the
 @code{error} case or the significantly simpler continuation. For example:
 
 @example
-if (0 != stat ("filename," &sbuf)) @{
+if (0 != stat ("filename,"
+               &sbuf))
+@{
   error();
- @}
- else @{
-   /* handle normal case here */
- @}
+@}
+else
+@{
+  /* handle normal case here */
+@}
 @end example
 
 @noindent
@@ -926,10 +934,12 @@ If possible, the error clause should be terminated with a @code{return} (or
 should be omitted:
 
 @example
-if (0 != stat ("filename," &sbuf)) @{
+if (0 != stat ("filename",
+               &sbuf))
+@{
   error();
   return;
- @}
+@}
 /* handle normal case here */
 @end example
 
@@ -942,10 +952,11 @@ NULL, and enums). With the two above rules (constants on left, errors in
 code clarity. For example, one can write:
 
 @example
-if (NULL == (value = lookup_function())) @{
+if (NULL == (value = lookup_function()))
+@{
   error();
   return;
- @}
+@}
 @end example
 
 @item Use @code{break} and @code{continue} wherever possible to avoid
@@ -953,13 +964,16 @@ deep(er) nesting. Thus, we would write:
 
 @example
 next = head;
-while (NULL != (pos = next)) @{
+while (NULL != (pos = next))
+@{
   next = pos->next;
   if (! should_free (pos))
     continue;
-  GNUNET_CONTAINER_DLL_remove (head, tail, pos);
+  GNUNET_CONTAINER_DLL_remove (head,
+                               tail,
+                               pos);
   GNUNET_free (pos);
- @}
+@}
 @end example
 
 instead of
@@ -986,7 +1000,9 @@ while (NULL != (pos = next))
   next = pos->next;
   if (! should_free (pos))
     continue;
-  GNUNET_CONTAINER_DLL_remove (head, tail, pos);
+  GNUNET_CONTAINER_DLL_remove (head,
+                               tail,
+                               pos);
   GNUNET_free (pos);
 @}
 @end example
@@ -1017,7 +1033,10 @@ be part of the variable declarations, should assign the
 @code{cls} argument to the precise expected type. For example:
 
 @example
-int callback (void *cls, char *args) @{
+int
+callback (void *cls,
+          char *args)
+@{
   struct Foo *foo = cls;
   int other_variables;
 
@@ -1025,13 +1044,18 @@ int callback (void *cls, char *args) @{
 @}
 @end example
 
+@item As shown in the example above, after the return type of a
+function there should be a break.  Each parameter should
+be on a new line.
 
 @item It is good practice to write complex @code{if} expressions instead
 of using deeply nested @code{if} statements. However, except for addition
 and multiplication, all operators should use parens. This is fine:
 
 @example
-if ( (1 == foo) || ((0 == bar) && (x != y)) )
+if ( (1 == foo) ||
+     ( (0 == bar) &&
+       (x != y) ) )
   return x;
 @end example
 
@@ -1098,7 +1122,7 @@ development of GNUnet services, command line tools, APIs and tests.
 First of all you have to obtain gnunet-ext from git:
 
 @example
-git clone https://gnunet.org/git/gnunet-ext.git
+git clone https://git.gnunet.org/gnunet-ext.git
 @end example
 
 The next step is to bootstrap and configure it. For configure you have to
@@ -1857,7 +1881,6 @@ Testbed API can accessed by including the
 * Hosts file format::
 * Topology file format::
 * Testbed Barriers::
-* Automatic large-scale deployment in the PlanetLab testbed::
 * TESTBED Caveats::
 @end menu
 
@@ -1905,7 +1928,7 @@ topology where peer connectivity follows power law - new peers are
 connected with high probability to well connected peers.
 (See Emergence of Scaling in Random Networks. Science 286,
 509-512, 1999
-(@uref{https://gnunet.org/git/bibliography.git/plain/docs/emergence_of_scaling_in_random_networks__barabasi_albert_science_286__1999.pdf, pdf}))
+(@uref{https://git.gnunet.org/bibliography.git/plain/docs/emergence_of_scaling_in_random_networks__barabasi_albert_science_286__1999.pdf, pdf}))
 
 @item @code{GNUNET_TESTBED_TOPOLOGY_FROM_FILE}: The topology information
 is loaded from a file. The path to the file has to be given.
@@ -2121,168 +2144,6 @@ message from its upward propagation --- the upward propagation is needed
 for ensuring that the barrier is reached by all the controllers and the
 downward propagation is for triggering that the barrier is crossed.
 
-@cindex PlanetLab testbed
-@node Automatic large-scale deployment in the PlanetLab testbed
-@subsection Automatic large-scale deployment in the PlanetLab testbed
-
-PlanetLab is a testbed for computer networking and distributed systems
-research. It was established in 2002 and as of June 2010 was composed of
-1090 nodes at 507 sites worldwide.
-
-To automate the GNUnet we created a set of automation tools to simplify
-the large-scale deployment. We provide you a set of scripts you can use
-to deploy GNUnet on a set of nodes and manage your installation.
-
-Please also check @uref{https://gnunet.org/installation-fedora8-svn} and
-@uref{https://gnunet.org/installation-fedora12-svn} to find detailed
-instructions how to install GNUnet on a PlanetLab node.
-
-
-@c ***********************************************************************
-@menu
-* PlanetLab Automation for Fedora8 nodes::
-* Install buildslave on PlanetLab nodes running fedora core 8::
-* Setup a new PlanetLab testbed using GPLMT::
-* Why do i get an ssh error when using the regex profiler?::
-@end menu
-
-@node PlanetLab Automation for Fedora8 nodes
-@subsubsection PlanetLab Automation for Fedora8 nodes
-
-@c ***********************************************************************
-@node Install buildslave on PlanetLab nodes running fedora core 8
-@subsubsection Install buildslave on PlanetLab nodes running fedora core 8
-@c ** Actually this is a subsubsubsection, but must be fixed differently
-@c ** as subsubsection is the lowest.
-
-Since most of the PlanetLab nodes are running the very old Fedora core 8
-image, installing the buildslave software is quite some pain. For our
-PlanetLab testbed we figured out how to install the buildslave software
-best.
-
-@c This is a very terrible way to suggest installing software.
-@c FIXME: Is there an official, safer way instead of blind-piping a
-@c script?
-@c FIXME: Use newer pypi URLs below.
-Install Distribute for Python:
-
-@example
-curl http://python-distribute.org/distribute_setup.py | sudo python
-@end example
-
-Install Distribute for zope.interface <= 3.8.0 (4.0 and 4.0.1 will not
-work):
-
-@example
-export PYPI=@value{PYPI-URL}
-wget $PYPI/z/zope.interface/zope.interface-3.8.0.tar.gz
-tar zvfz zope.interface-3.8.0.tar.gz
-cd zope.interface-3.8.0
-sudo python setup.py install
-@end example
-
-Install the buildslave software (0.8.6 was the latest version):
-
-@example
-export GCODE="http://buildbot.googlecode.com/files"
-wget $GCODE/buildbot-slave-0.8.6p1.tar.gz
-tar xvfz buildbot-slave-0.8.6p1.tar.gz
-cd buildslave-0.8.6p1
-sudo python setup.py install
-@end example
-
-The setup will download the matching twisted package and install it.
-It will also try to install the latest version of zope.interface which
-will fail to install. Buildslave will work anyway since version 3.8.0
-was installed before!
-
-@c ***********************************************************************
-@node Setup a new PlanetLab testbed using GPLMT
-@subsubsection Setup a new PlanetLab testbed using GPLMT
-
-@itemize @bullet
-@item Get a new slice and assign nodes
-Ask your PlanetLab PI to give you a new slice and assign the nodes you
-need
-@item Install a buildmaster
-You can stick to the buildbot documentation:@
-@uref{http://buildbot.net/buildbot/docs/current/manual/installation.html}
-@item Install the buildslave software on all nodes
-To install the buildslave on all nodes assigned to your slice you can use
-the tasklist @code{install_buildslave_fc8.xml} provided with GPLMT:
-
-@example
-./gplmt.py -c contrib/tumple_gnunet.conf -t \
-contrib/tasklists/install_buildslave_fc8.xml -a -p <planetlab password>
-@end example
-
-@item Create the buildmaster configuration and the slave setup commands
-
-The master and the and the slaves have need to have credentials and the
-master has to have all nodes configured. This can be done with the
-@file{create_buildbot_configuration.py} script in the @file{scripts}
-directory.
-
-This scripts takes a list of nodes retrieved directly from PlanetLab or
-read from a file and a configuration template and creates:
-
-@itemize @bullet
-@item a tasklist which can be executed with gplmt to setup the slaves
-@item a master.cfg file containing a PlanetLab nodes
-@end itemize
-
-A configuration template is included in the <contrib>, most important is
-that the script replaces the following tags in the template:
-
-%GPLMT_BUILDER_DEFINITION :@ GPLMT_BUILDER_SUMMARY@ GPLMT_SLAVES@
-%GPLMT_SCHEDULER_BUILDERS
-
-Create configuration for all nodes assigned to a slice:
-
-@example
-./create_buildbot_configuration.py -u <planetlab username> \
--p <planetlab password> -s <slice> -m <buildmaster+port> \
--t <template>
-@end example
-
-Create configuration for some nodes in a file:
-
-@example
-./create_buildbot_configuration.p -f <node_file> \
--m <buildmaster+port> -t <template>
-@end example
-
-@item Copy the @file{master.cfg} to the buildmaster and start it
-Use @code{buildbot start <basedir>} to start the server
-@item Setup the buildslaves
-@end itemize
-
-@c ***********************************************************************
-@node Why do i get an ssh error when using the regex profiler?
-@subsubsection Why do i get an ssh error when using the regex profiler?
-
-Why do i get an ssh error "Permission denied (publickey,password)." when
-using the regex profiler although passwordless ssh to localhost works
-using publickey and ssh-agent?
-
-You have to generate a public/private-key pair with no password:@
-@code{ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_localhost}@
-and then add the following to your ~/.ssh/config file:
-
-@code{Host 127.0.0.1@ IdentityFile ~/.ssh/id_localhost}
-
-now make sure your hostsfile looks like
-
-@example
-[USERNAME]@@127.0.0.1:22@
-[USERNAME]@@127.0.0.1:22
-@end example
-
-You can test your setup by running @code{ssh 127.0.0.1} in a
-terminal and then in the opened session run it again.
-If you were not asked for a password on either login,
-then you should be good to go.
-
 @cindex TESTBED Caveats
 @node TESTBED Caveats
 @subsection TESTBED Caveats
@@ -2300,7 +2161,7 @@ subsystem.
 @subsubsection CORE must be started
 
 A uncomplicated issue is bug #3993
-(@uref{https://gnunet.org/bugs/view.php?id=3993, https://gnunet.org/bugs/view.php?id=3993}):
+(@uref{https://bugs.gnunet.org/view.php?id=3993, https://bugs.gnunet.org/view.php?id=3993}):
 Your configuration MUST somehow ensure that for each peer the
 @code{CORE} service is started when the peer is setup, otherwise
 @code{TESTBED} may fail to connect peers when the topology is initialized,
@@ -2401,10 +2262,11 @@ the program at various levels.
 @file{gnunet_common.h} defines several @strong{log levels}:
 @table @asis
 
-@item ERROR for errors (really problematic situations, often leading to
-crashes)
-@item WARNING for warnings (troubling situations that might have
-negative consequences, although not fatal)
+@item ERROR for errors
+(really problematic situations, often leading to crashes)
+@item WARNING for warnings
+(troubling situations that might have negative consequences, although
+not fatal)
 @item INFO for various information.
 Used somewhat rarely, as GNUnet statistics is used to hold and display
 most of the information that users might find interesting.
@@ -2747,7 +2609,8 @@ code.
 
 Since now activating DEBUG automatically makes it VERBOSE and activates
 @strong{all} debug messages by default, you probably want to use the
-https://gnunet.org/logging functionality to filter only relevant messages.
+@uref{https://docs.gnunet.org/#Logging, https://docs.gnunet.org/#Logging}
+functionality to filter only relevant messages.
 A suitable configuration could be:
 
 @example
@@ -2829,7 +2692,7 @@ which both ensure correct alignment when sending structs over the network.
 @c ***********************************************************************
 @node Client - Establish connection
 @subsubsection Client - Establish connection
-@c %**end of header
+
 
 
 At first, on the client side, the underlying API is employed to create a
@@ -2844,7 +2707,7 @@ client = GNUNET_CLIENT_connect ("transport", cfg);
 @c ***********************************************************************
 @node Client - Initialize request message
 @subsubsection Client - Initialize request message
-@c %**end of header
+
 
 When the connection is ready, we initialize the message. In this step,
 all the fields of the message should be properly initialized, namely the
@@ -2877,7 +2740,7 @@ Big Endian and Little Endian.
 @c ***********************************************************************
 @node Client - Send request and receive response
 @subsubsection Client - Send request and receive response
-@c %**end of header
+
 
 @b{FIXME: This is very outdated, see the tutorial for the current API!}
 
@@ -2912,7 +2775,7 @@ int main(int argc, char**argv) @{
 @c ***********************************************************************
 @node Server - Add new handles for specified messages
 @subsubsection Server - Add new handles for specified messages
-@c %**end of header
+
 
 in the function above the argument @code{run} is used to initiate
 transport service,and defined like this:
@@ -2970,7 +2833,7 @@ depicted as @code{@{NULL, NULL, 0, 0@}} is set in the last area.
 @c ***********************************************************************
 @node Server - Process request message
 @subsubsection Server - Process request message
-@c %**end of header
+
 
 After the initialization of transport service, the request message would
 be processed. Before handling the main message data, the validity of this
@@ -3021,7 +2884,7 @@ message.
 @c ***********************************************************************
 @node Server - Response to client
 @subsubsection Server - Response to client
-@c %**end of header
+
 
 Once the processing of current request is done, the server should give the
 response to the client. A new @code{struct AddressLookupMessage} would be
@@ -3057,7 +2920,7 @@ to send the message.
 @c ***********************************************************************
 @node Server - Notification of clients
 @subsubsection Server - Notification of clients
-@c %**end of header
+
 
 Often a service needs to (repeatedly) transmit notifications to a client
 or a group of clients. In these cases, the client typically has once
@@ -3086,7 +2949,7 @@ messages to the server.
 @node Conversion between Network Byte Order (Big Endian) and Host Byte Order
 @subsubsection Conversion between Network Byte Order (Big Endian) and Host Byte Order
 @c %** subsub? it's a referenced page on the ipc document.
-@c %**end of header
+
 
 Here we can simply comprehend big endian and little endian as Network Byte
 Order and Host Byte Order respectively. What is the difference between
@@ -3142,7 +3005,7 @@ byte order.
 @cindex Cryptography API
 @node Cryptography API
 @subsection Cryptography API
-@c %**end of header
+
 
 The gnunetutil APIs provides the cryptographic primitives used in GNUnet.
 GNUnet uses 2048 bit RSA keys for the session key exchange and for signing
@@ -3179,7 +3042,7 @@ should be considered secure for traditional applications of RSA.
 @cindex Message Queue API
 @node Message Queue API
 @subsection Message Queue API
-@c %**end of header
+
 
 @strong{ Introduction }@
 Often, applications need to queue messages that
@@ -3323,7 +3186,7 @@ callback. When canceling an envelope, it is not necessary@ to call
 @cindex Service API
 @node Service API
 @subsection Service API
-@c %**end of header
+
 
 Most GNUnet code lives in the form of services. Services are processes
 that offer an API for other components of the system to build on. Those
@@ -3399,7 +3262,7 @@ clients to set (possibly persistent) statistic values before terminating.
 @c ***********************************************************************
 @node Optimizing Memory Consumption of GNUnet's (Multi-) Hash Maps
 @subsection Optimizing Memory Consumption of GNUnet's (Multi-) Hash Maps
-@c %**end of header
+
 
 A commonly used data structure in GNUnet is a (multi-)hash map. It is most
 often used to map a peer identity to some data structure, but also to map
@@ -3423,7 +3286,7 @@ the hash map.
 
 @node Analysis
 @subsubsection Analysis
-@c %**end of header
+
 
 The main reason for the "excessive" memory consumption by the hash map is
 that GNUnet uses 512-bit cryptographic hash codes --- and the
@@ -3474,7 +3337,7 @@ we tend to really try to keep the entries small.
 @c ***********************************************************************
 @node Solution
 @subsubsection Solution
-@c %**end of header
+
 
 The solution that has now been implemented is to @strong{optionally}
 allow the hash map to not make a (deep) copy of the hash but instead have
@@ -3492,7 +3355,7 @@ pointer and undefined behavior of the (multi-)hash map API.
 @c ***********************************************************************
 @node Migration
 @subsubsection Migration
-@c %**end of header
+
 
 To use the new feature, first check that the values contain the respective
 key (and never modify it). Then, all calls to
@@ -3541,7 +3404,7 @@ removed from the map, undefined behavior is likely to be observed.
 @c ***********************************************************************
 @node Conclusion
 @subsubsection Conclusion
-@c %**end of header
+
 
 The new optimization can is often applicable and can result in a
 reduction in memory consumption of up to 30% in practice. However, it
@@ -3554,10 +3417,11 @@ at least until benchmarks exist).
 @c ***********************************************************************
 @node Availability
 @subsubsection Availability
-@c %**end of header
 
-The new multi hash map code was committed in SVN 24319 (will be in GNUnet
-0.9.4). Various subsystems (transport, core, dht, file-sharing) were
+
+The new multi hash map code was committed in SVN 24319 (which made its
+way into GNUnet version 0.9.4).
+Various subsystems (transport, core, dht, file-sharing) were
 previously audited and modified to take advantage of the new capability.
 In particular, memory consumption of the file-sharing service is expected
 to drop by 20-30% due to this change.
@@ -3566,7 +3430,7 @@ to drop by 20-30% due to this change.
 @cindex CONTAINER_MDLL API
 @node CONTAINER_MDLL API
 @subsection CONTAINER_MDLL API
-@c %**end of header
+
 
 This text documents the GNUNET_CONTAINER_MDLL API. The
 GNUNET_CONTAINER_MDLL API is similar to the GNUNET_CONTAINER_DLL API in
@@ -3632,7 +3496,7 @@ Iterating over the list should be done by directly accessing the
 @cindex ARM
 @node Automatic Restart Manager (ARM)
 @section Automatic Restart Manager (ARM)
-@c %**end of header
+
 
 GNUnet's Automated Restart Manager (ARM) is the GNUnet service responsible
 for system initialization and service babysitting. ARM starts and halts
@@ -3653,7 +3517,7 @@ about how ARM works and how to interact with it.
 @c ***********************************************************************
 @node Basic functionality
 @subsection Basic functionality
-@c %**end of header
+
 
 @itemize @bullet
 @item ARM source code can be found under "src/arm".@ Service processes are
@@ -3677,7 +3541,7 @@ it to start a service "resolver", stops the "resolver" then stops "ARM".
 @c ***********************************************************************
 @node Key configuration options
 @subsection Key configuration options
-@c %**end of header
+
 
 Configurations for ARM and services should be available in a .conf file
 (As an example, see test_arm_api_data.conf). When running ARM, the
@@ -3746,7 +3610,7 @@ services that are going to run.
 @c ***********************************************************************
 @node ARM - Availability
 @subsection ARM - Availability
-@c %**end of header
+
 
 As mentioned before, one of the features provided by ARM is starting
 services on demand. Consider the example of one service "client" that
@@ -3834,7 +3698,7 @@ problematic service.
 @cindex TRANSPORT Subsystem
 @node TRANSPORT Subsystem
 @section TRANSPORT Subsystem
-@c %**end of header
+
 
 This chapter documents how the GNUnet transport subsystem works. The
 GNUnet transport subsystem consists of three main components: the
@@ -3892,7 +3756,7 @@ transport service.
 
 @node Address validation protocol
 @subsection Address validation protocol
-@c %**end of header
+
 
 This section documents how the GNUnet transport service validates
 connections with other peers. It is a high-level description of the
@@ -3955,7 +3819,7 @@ implementation details).
 @cindex NAT library
 @node NAT library
 @section NAT library
-@c %**end of header
+
 
 The goal of the GNUnet NAT library is to provide a general-purpose API for
 NAT traversal @strong{without} third-party support. So protocols that
@@ -4002,7 +3866,7 @@ This way, it is easy to test if the current NAT configuration is valid.
 
 @node Distance-Vector plugin
 @section Distance-Vector plugin
-@c %**end of header
+
 
 The Distance Vector (DV) transport is a transport mechanism that allows
 peers to act as relays for each other, thereby connecting peers that would
@@ -4071,7 +3935,8 @@ message, and delivers it to Carol as though it came directly from Alice.
 @cindex SMTP plugin
 @node SMTP plugin
 @section SMTP plugin
-@c %**end of header
+
+@c TODO: Update!
 
 This section describes the new SMTP transport plugin for GNUnet as it
 exists in the 0.7.x and 0.8.x branch. SMTP support is currently not
@@ -4079,6 +3944,9 @@ available in GNUnet 0.9.x. This page also describes the transport layer
 abstraction (as it existed in 0.7.x and 0.8.x) in more detail and gives
 some benchmarking results. The performance results presented are quite
 old and maybe outdated at this point.
+For the readers in the year 2019, you will notice by the mention of
+version 0.7, 0.8, and 0.9 that this section has to be taken with your
+usual grain of salt and be updated eventually.
 
 @itemize @bullet
 @item Why use SMTP for a peer-to-peer transport?
@@ -4100,7 +3968,7 @@ old and maybe outdated at this point.
 
 @node Why use SMTP for a peer-to-peer transport?
 @subsection Why use SMTP for a peer-to-peer transport?
-@c %**end of header
+
 
 There are many reasons why one would not want to use SMTP:
 
@@ -4135,7 +4003,7 @@ type of situation.
 
 @node How does it work?
 @subsection How does it work?
-@c %**end of header
+
 
 When a GNUnet peer needs to send a message to another GNUnet peer that has
 advertised (only) an SMTP transport address, GNUnet base64-encodes the
@@ -4148,7 +4016,7 @@ GNUnet E-mail messages by searching for a generic filter.
 
 @node How do I configure my peer?
 @subsection How do I configure my peer?
-@c %**end of header
+
 
 First, you need to configure @code{procmail} to filter your inbound E-mail
 for GNUnet traffic. The GNUnet messages must be delivered into a pipe, for
@@ -4193,7 +4061,7 @@ This should be it, but you may probably want to test it first.
 
 @node How do I test if it works?
 @subsection How do I test if it works?
-@c %**end of header
+
 
 Any transport can be subjected to some rudimentary tests using the
 @code{gnunet-transport-check} tool. The tool sends a message to the local
@@ -4216,7 +4084,7 @@ to send and receive messages.
 
 @node How fast is it?
 @subsection How fast is it?
-@c %**end of header
+
 
 We have measured the performance of the UDP, TCP and SMTP transport layer
 directly and when used from an application using the GNUnet core.
@@ -4283,7 +4151,7 @@ benchmarking results.
 @cindex Bluetooth plugin
 @node Bluetooth plugin
 @section Bluetooth plugin
-@c %**end of header
+
 
 This page describes the new Bluetooth transport plugin for GNUnet. The
 plugin is still in the testing stage so don't expect it to work
@@ -4309,7 +4177,7 @@ ask on the IRC channel.
 
 @node What do I need to use the Bluetooth plugin transport?
 @subsection What do I need to use the Bluetooth plugin transport?
-@c %**end of header
+
 
 If you are a GNU/Linux user and you want to use the Bluetooth
 transport plugin you should install the
@@ -4336,7 +4204,7 @@ protocol so we cannot turn on your device programatically!
 @c FIXME: Change to unique title
 @node How does it work2?
 @subsection How does it work2?
-@c %**end of header
+
 
 The Bluetooth transport plugin uses virtually the same code as the WLAN
 plugin and only the helper binary is different. The helper takes a single
@@ -4366,7 +4234,7 @@ discovery.
 
 @node What possible errors should I be aware of?
 @subsection What possible errors should I be aware of?
-@c %**end of header
+
 
 @emph{This section is dedicated for GNU/Linux users}
 
@@ -4405,7 +4273,7 @@ the device and to send some particular commands to it.
 @c FIXME: A more unique name
 @node How do I configure my peer2?
 @subsection How do I configure my peer2?
-@c %**end of header
+
 
 On GNU/Linux, you just have to be sure that the interface name
 corresponds to the one that you want to use.
@@ -4439,7 +4307,7 @@ transport service.
 
 @node How can I test it?
 @subsection How can I test it?
-@c %**end of header
+
 
 If you have two Bluetooth devices on the same machine and you are using
 GNU/Linux you must:
@@ -4486,7 +4354,7 @@ transport service.
 
 @node The implementation of the Bluetooth transport plugin
 @subsection The implementation of the Bluetooth transport plugin
-@c %**end of header
+
 
 This page describes the implementation of the Bluetooth transport plugin.
 
@@ -4520,7 +4388,7 @@ platforms.
 
 @node Linux functionality
 @subsubsection Linux functionality
-@c %**end of header
+
 
 In order to implement the plugin functionality on GNU/Linux I
 used the BlueZ stack.
@@ -4616,7 +4484,7 @@ support for @strong{broadcast messages}.}
 
 @node Details about the broadcast implementation
 @subsubsection Details about the broadcast implementation
-@c %**end of header
+
 
 First I want to point out that the broadcast functionality for the CONTROL
 messages is not implemented in a conventional way. Since the inquiry scan
@@ -4663,7 +4531,7 @@ simply use the socket.
 
 @node Windows functionality
 @subsubsection Windows functionality
-@c %**end of header
+
 
 For Windows I decided to use the Microsoft Bluetooth stack which has the
 advantage of coming standard from Windows XP SP2. The main disadvantage is
@@ -4718,7 +4586,7 @@ broadcast messages. When it receives a broadcast message it will skip it.
 
 @node Pending features
 @subsubsection Pending features
-@c %**end of header
+
 
 @itemize @bullet
 @item Implement the broadcast functionality on Windows @emph{(currently
@@ -4734,7 +4602,7 @@ contact me.
 
 @node WLAN plugin
 @section WLAN plugin
-@c %**end of header
+
 
 This section documents how the wlan transport plugin works. Parts which
 are not implemented yet or could be better implemented are described at
@@ -4743,7 +4611,7 @@ the end.
 @cindex ATS Subsystem
 @node ATS Subsystem
 @section ATS Subsystem
-@c %**end of header
+
 
 ATS stands for "automatic transport selection", and the function of ATS in
 GNUnet is to decide on which address (and thus transport plugin) should
@@ -4766,7 +4634,7 @@ superior.
 @cindex CORE Subsystem
 @node CORE Subsystem
 @section CORE Subsystem
-@c %**end of header
+
 
 The CORE subsystem in GNUnet is responsible for securing link-layer
 communications between nodes in the GNUnet overlay network. CORE builds
@@ -4810,7 +4678,7 @@ message counters and ephemeral keys)
 @cindex core subsystem limitations
 @node Limitations
 @subsection Limitations
-@c %**end of header
+
 
 CORE does not perform
 @uref{http://en.wikipedia.org/wiki/Routing, routing}; using CORE it is
@@ -4844,7 +4712,7 @@ control is needed, applications should use the CADET service.
 @cindex when is a peer connected
 @node When is a peer "connected"?
 @subsection When is a peer "connected"?
-@c %**end of header
+
 
 In addition to the security features mentioned above, CORE also provides
 one additional key feature to applications using it, and that is a
@@ -4877,7 +4745,7 @@ connection.
 @cindex libgnunetcore
 @node libgnunetcore
 @subsection libgnunetcore
-@c %**end of header
+
 
 The CORE API (defined in @file{gnunet_core_service.h}) is the basic
 messaging API used by P2P applications built using GNUnet. It provides
@@ -4942,7 +4810,7 @@ re-established, the applications will be receive matching connect events.
 @cindex core clinet-service protocol
 @node The CORE Client-Service Protocol
 @subsection The CORE Client-Service Protocol
-@c %**end of header
+
 
 This section describes the protocol between an application using the CORE
 service (the client) and the CORE service process itself.
@@ -4956,7 +4824,7 @@ service (the client) and the CORE service process itself.
 
 @node Setup2
 @subsubsection Setup2
-@c %**end of header
+
 
 When a client connects to the CORE service, it first sends a
 @code{InitMessage} which specifies options for the connection and a set of
@@ -4985,7 +4853,7 @@ both CORE and the client can send messages.
 
 @node Notifications
 @subsubsection Notifications
-@c %**end of header
+
 
 The CORE will send @code{ConnectNotifyMessage}s and
 @code{DisconnectNotifyMessage}s whenever peers connect or disconnect from
@@ -5001,7 +4869,7 @@ identity given is that of the receiver.
 
 @node Sending
 @subsubsection Sending
-@c %**end of header
+
 
 When a client wants to transmit a message, it first requests a
 transmission slot by sending a @code{SendMessageRequest} which specifies
@@ -5021,7 +4889,7 @@ for each request).
 @cindex CORE Peer-to-Peer Protocol
 @node The CORE Peer-to-Peer Protocol
 @subsection The CORE Peer-to-Peer Protocol
-@c %**end of header
+
 
 
 @menu
@@ -5034,7 +4902,7 @@ for each request).
 @cindex EphemeralKeyMessage creation
 @node Creating the EphemeralKeyMessage
 @subsubsection Creating the EphemeralKeyMessage
-@c %**end of header
+
 
 When the CORE service starts, each peer creates a fresh ephemeral (ECC)
 public-private key pair and signs the corresponding
@@ -5075,7 +4943,7 @@ connection using the new ephemeral key
 
 @node Establishing a connection
 @subsubsection Establishing a connection
-@c %**end of header
+
 
 Peers begin their interaction by sending a @code{EphemeralKeyMessage} to
 the other peer once the TRANSPORT service notifies the CORE service about
@@ -5093,7 +4961,7 @@ connection to @code{KX_STATE_UP}.
 
 @node Encryption and Decryption
 @subsubsection Encryption and Decryption
-@c %**end of header
+
 
 All functions related to the key exchange and encryption/decryption of
 messages can be found in @file{gnunet-service-core_kx.c} (except for the
@@ -5121,7 +4989,7 @@ older than 12 hours.
 
 @node Type maps
 @subsubsection Type maps
-@c %**end of header
+
 
 Once an encrypted connection has been established, peers begin to exchange
 type maps. Type maps are used to allow the CORE service to determine which
@@ -5154,6 +5022,8 @@ receiving a type map by sending back a
 retransmit the type map (with exponential back-off).
 
 @cindex CADET Subsystem
+@cindex CADET
+@cindex cadet
 @node CADET Subsystem
 @section CADET Subsystem
 
@@ -5220,6 +5090,7 @@ Should a message get lost on TRANSPORT/CORE level, if a channel is
 created with as reliable, CADET will retransmit the lost message and
 deliver it in order to the destination application.
 
+@pindex GNUNET_CADET_connect
 To communicate with other peers using CADET, it is necessary to first
 connect to the service using @code{GNUNET_CADET_connect}.
 This function takes several parameters in form of callbacks, to allow the
@@ -5231,7 +5102,8 @@ CADET, even do one connection per listening port).
 The function returns a handle which has to be used for any further
 interaction with the service.
 
-To connect to a remote peer a client has to call the
+@pindex GNUNET_CADET_channel_create
+To connect to a remote peer, a client has to call the
 @code{GNUNET_CADET_channel_create} function. The most important parameters
 given are the remote peer's identity (it public key) and a port, which
 specifies which application on the remote peer to connect to, similar to
@@ -5241,6 +5113,7 @@ exchanges to assure and authenticated, secure and verified communication.
 Similar to @code{GNUNET_CADET_connect},@code{GNUNET_CADET_create_channel}
 returns a handle to interact with the created channel.
 
+@pindex GNUNET_CADET_notify_transmit_ready
 For every message the client wants to send to the remote application,
 @code{GNUNET_CADET_notify_transmit_ready} must be called, indicating the
 channel on which the message should be sent and the size of the message
@@ -5257,6 +5130,7 @@ case. To be alerted when a channel is online, a client can call
 means that the channel is online. The callback can give 0 bytes to CADET
 if no message is to be sent, this is OK.
 
+@pindex GNUNET_CADET_notify_transmit_cancel
 If a transmission was requested but before the callback fires it is no
 longer needed, it can be canceled with
 @code{GNUNET_CADET_notify_transmit_ready_cancel}, which uses the handle
@@ -5265,6 +5139,7 @@ As in the case of CORE, only one message can be requested at a time: a
 client must not call @code{GNUNET_CADET_notify_transmit_ready} again until
 the callback is called or the request is canceled.
 
+@pindex GNUNET_CADET_channel_destroy
 When a channel is no longer needed, a client can call
 @code{GNUNET_CADET_channel_destroy} to get rid of it.
 Note that CADET will try to transmit all pending traffic before notifying
@@ -5276,6 +5151,7 @@ on any incoming or outgoing channels are given to the client when CADET
 executes the callbacks given to it at the time of
 @code{GNUNET_CADET_connect}.
 
+@pindex GNUNET_CADET_disconnect
 Finally, when an application no longer wants to use CADET, it should call
 @code{GNUNET_CADET_disconnect}, but first all channels and pending
 transmissions must be closed (otherwise CADET will complain).
@@ -5393,7 +5269,7 @@ to all the other peers, who will calculate the estimate from it.
 @node Target value
 @subsubsection Target value
 
-@c %**end of header
+
 
 The target value itself is generated by hashing the current time, rounded
 down to an agreed value. If the rounding amount is 1h (default) and the
@@ -5403,7 +5279,7 @@ Every repetition is called a round.
 
 @node Timing
 @subsubsection Timing
-@c %**end of header
+
 
 The NSE subsystem has some timing control to avoid everybody broadcasting
 its ID all at one. Once each peer has the target random value, it
@@ -5420,7 +5296,7 @@ peers closest to the target value start broadcasting their ID the first.
 @node Controlled Flooding
 @subsubsection Controlled Flooding
 
-@c %**end of header
+
 
 When a peer receives a value, first it verifies that it is closer than the
 closest value it had so far, otherwise it answers the incoming message
@@ -5439,7 +5315,7 @@ to the neighbors.
 @node Calculating the estimate
 @subsubsection Calculating the estimate
 
-@c %**end of header
+
 
 Once the closest ID has been spread across the network each peer gets the
 exact distance between this ID and the target value of the round and
@@ -5458,7 +5334,7 @@ means a factor of two in the size estimate.
 @node libgnunetnse
 @subsection libgnunetnse
 
-@c %**end of header
+
 
 The NSE subsystem has the simplest API of all services, with only two
 calls: @code{GNUNET_NSE_connect} and @code{GNUNET_NSE_disconnect}.
@@ -5484,7 +5360,7 @@ is no longer called with new estimates.
 @node Results
 @subsubsection Results
 
-@c %**end of header
+
 
 The callback provides two values: the average and the
 @uref{http://en.wikipedia.org/wiki/Standard_deviation, standard deviation}
@@ -5522,7 +5398,7 @@ changing rapidly).
 @node libgnunetnse - Examples
 @subsubsection libgnunetnse -Examples
 
-@c %**end of header
+
 
 Let's close with a couple examples.
 
@@ -5549,7 +5425,7 @@ case a 5 sigma minimum would be 2 million and a 6 sigma minimum,
 @node The NSE Client-Service Protocol
 @subsection The NSE Client-Service Protocol
 
-@c %**end of header
+
 
 As with the API, the client-service protocol is very simple, only has 2
 different messages, defined in @code{src/nse/nse.h}:
@@ -5570,8 +5446,8 @@ simply disconnects from the service, with no message involved.
 @node The NSE Peer-to-Peer Protocol
 @subsection The NSE Peer-to-Peer Protocol
 
-@c %**end of header
 
+@pindex GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD
 The NSE subsystem only has one message in the P2P protocol, the
 @code{GNUNET_MESSAGE_TYPE_NSE_P2P_FLOOD} message.
 
@@ -5625,7 +5501,7 @@ traffic spikes and minimize cross-messages.
 @node HOSTLIST Subsystem
 @section HOSTLIST Subsystem
 
-@c %**end of header
+
 
 Peers in the GNUnet overlay network need address information so that they
 can connect with other peers. GNUnet uses so called HELLO messages to
@@ -5663,7 +5539,7 @@ manual effort or the use of a HOSTLIST to obtain HELLOs.
 @node HELLOs
 @subsection HELLOs
 
-@c %**end of header
+
 
 The basic information peers require to connect to other peers are
 contained in so called HELLO messages you can think of as a business card.
@@ -5675,7 +5551,7 @@ contact other peers.
 @node Overview for the HOSTLIST subsystem
 @subsection Overview for the HOSTLIST subsystem
 
-@c %**end of header
+
 
 The HOSTLIST subsystem provides a way to distribute and obtain contact
 information to connect to other peers using a simple HTTP GET request.
@@ -5701,7 +5577,7 @@ service.
 @node Features
 @subsubsection Features
 
-@c %**end of header
+
 
 The HOSTLIST daemon can:
 
@@ -5719,7 +5595,7 @@ peers
 @node HOSTLIST - Limitations
 @subsubsection HOSTLIST - Limitations
 
-@c %**end of header
+
 
 The HOSTLIST daemon does not:
 
@@ -5731,7 +5607,7 @@ The HOSTLIST daemon does not:
 @node Interacting with the HOSTLIST daemon
 @subsection Interacting with the HOSTLIST daemon
 
-@c %**end of header
+
 
 The HOSTLIST subsystem is currently implemented as a daemon, so there is
 no need for the user to interact with it and therefore there is no
@@ -5759,7 +5635,7 @@ download frequency).
 @node Hostlist security address validation
 @subsection Hostlist security address validation
 
-@c %**end of header
+
 
 Since information obtained from other parties cannot be trusted without
 validation, we have to distinguish between @emph{validated} and
@@ -5780,12 +5656,13 @@ to the TRANSPORT server to validate the addresses.
 @node The HOSTLIST daemon
 @subsection The HOSTLIST daemon
 
-@c %**end of header
+
 
 The hostlist daemon is the main component of the HOSTLIST subsystem. It is
 started by the ARM service and (if configured) starts the HOSTLIST client
 and server components.
 
+@pindex GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT
 If the daemon provides a hostlist itself it can advertise it's own
 hostlist to other peers. To do so it sends a
 @code{GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT} message to other peers
@@ -5810,7 +5687,7 @@ subsystems and disconnecting from CORE.
 @node The HOSTLIST server
 @subsection The HOSTLIST server
 
-@c %**end of header
+
 
 The server provides a way for other peers to obtain HELLOs. Basically it
 is a small web server other peers can connect to and download a list of
@@ -5826,7 +5703,7 @@ to other peers connecting on CORE level.
 @node The HTTP Server
 @subsubsection The HTTP Server
 
-@c %**end of header
+
 
 During startup, the server starts a web server listening on the port
 specified with the HTTPPORT value (default 8080). In addition it connects
@@ -5852,7 +5729,7 @@ The connection will be closed immediately if no hostlist is available.
 @node Advertising the URL
 @subsubsection Advertising the URL
 
-@c %**end of header
+
 
 The server also advertises the URL to download the hostlist to other peers
 if hostlist advertisement is enabled.
@@ -5864,7 +5741,7 @@ peer using the CORE service.
 @node The HOSTLIST client
 @subsection The HOSTLIST client
 
-@c %**end of header
+
 
 The client provides the functionality to download the list of HELLOs from
 a set of URLs.
@@ -5888,7 +5765,7 @@ The client supports two modes of operation:
 @node Bootstrapping
 @subsubsection Bootstrapping
 
-@c %**end of header
+
 
 For bootstrapping, it schedules a task to download the hostlist from the
 set of known URLs.
@@ -5917,7 +5794,7 @@ quality of this URL is updated.
 @node Learning
 @subsubsection Learning
 
-@c %**end of header
+
 
 The client also manages hostlist advertisements from other peers. The
 HOSTLIST daemon forwards @code{GNUNET_MESSAGE_TYPE_HOSTLIST_ADVERTISEMENT}
@@ -5936,7 +5813,7 @@ never discarded.
 @node Usage
 @subsection Usage
 
-@c %**end of header
+
 
 To start HOSTLIST by default, it has to be added to the DEFAULTSERVICES
 section for the ARM services. This is done in the default configuration.
@@ -5950,7 +5827,7 @@ Configuring your peer to provide a hostlist
 @node IDENTITY Subsystem
 @section IDENTITY Subsystem
 
-@c %**end of header
+
 
 Identities of "users" in GNUnet are called egos.
 Egos can be used as pseudonyms ("fake names") or be tied to an
@@ -6006,7 +5883,7 @@ between anonymous and pseudonymous egos.
 @cindex libgnunetidentity
 @node libgnunetidentity
 @subsection libgnunetidentity
-@c %**end of header
+
 
 
 @menu
@@ -6020,7 +5897,7 @@ between anonymous and pseudonymous egos.
 @node Connecting to the service
 @subsubsection Connecting to the service
 
-@c %**end of header
+
 
 First, typical clients connect to the identity service using
 @code{GNUNET_IDENTITY_connect}. This function takes a callback as a
@@ -6056,7 +5933,7 @@ ego's handle.
 @node Operations on Egos
 @subsubsection Operations on Egos
 
-@c %**end of header
+
 
 Given an ego handle, the main operations are to get its associated private
 key using @code{GNUNET_IDENTITY_ego_get_private_key} or its associated
@@ -6079,7 +5956,7 @@ only the continuation will no longer be called.
 @node The anonymous Ego
 @subsubsection The anonymous Ego
 
-@c %**end of header
+
 
 A special way to obtain an ego handle is to call
 @code{GNUNET_IDENTITY_ego_get_anonymous}, which returns an ego for the
@@ -6114,7 +5991,7 @@ using @code{GNUNET_IDENTITY_get}.
 @node The IDENTITY Client-Service Protocol
 @subsection The IDENTITY Client-Service Protocol
 
-@c %**end of header
+
 
 A client connecting to the identity service first sends a message with
 type
@@ -6205,7 +6082,7 @@ private key.}
 @node Editing Zone Information
 @subsubsection Editing Zone Information
 
-@c %**end of header
+
 
 NAMESTORE provides functions to lookup records stored under a label in a
 zone and to store records under a label in a zone.
@@ -6245,7 +6122,7 @@ the operation.
 @node Iterating Zone Information
 @subsubsection Iterating Zone Information
 
-@c %**end of header
+
 
 A client can iterate over all information in a zone or all zones managed
 by NAMESTORE.
@@ -6265,7 +6142,7 @@ NULL value to indicate.
 @node Monitoring Zone Information
 @subsubsection Monitoring Zone Information
 
-@c %**end of header
+
 
 Clients can also monitor zones to be notified about changes. Here the
 clients uses the @code{GNUNET_NAMESTORE_zone_monitor_start} function and
@@ -6286,7 +6163,7 @@ from the function to start the monitoring.
 @node PEERINFO Subsystem
 @section PEERINFO Subsystem
 
-@c %**end of header
+
 
 The PEERINFO subsystem is used to store verified (validated) information
 about known peers in a persistent way. It obtains these addresses for
@@ -6319,7 +6196,7 @@ service providing this functionality.
 @node PEERINFO - Features
 @subsection PEERINFO - Features
 
-@c %**end of header
+
 
 @itemize @bullet
 @item Persistent storage
@@ -6339,7 +6216,7 @@ service providing this functionality.
 @node DeveloperPeer Information
 @subsection DeveloperPeer Information
 
-@c %**end of header
+
 
 The PEERINFO subsystem stores these information in the form of HELLO
 messages you can think of as business cards.
@@ -6373,7 +6250,7 @@ subsystem using these information to maintain connections to other peers.
 @node Startup
 @subsection Startup
 
-@c %**end of header
+
 
 During startup the PEERINFO services loads persistent HELLOs from disk.
 First PEERINFO parses the directory configured in the HOSTS value of the
@@ -6389,7 +6266,7 @@ The use of these HELLOs can be prevented by setting the
 @node Managing Information
 @subsection Managing Information
 
-@c %**end of header
+
 
 The PEERINFO services stores information about known PEERS and a single
 HELLO message for every peer.
@@ -6411,7 +6288,7 @@ from the disk.
 @node Obtaining Information
 @subsection Obtaining Information
 
-@c %**end of header
+
 
 When a client requests information from PEERINFO, PEERINFO performs a
 lookup for the respective peer or all peers if desired and transmits this
@@ -6428,7 +6305,7 @@ merge for example) or a new peer was added.
 @node The PEERINFO Client-Service Protocol
 @subsection The PEERINFO Client-Service Protocol
 
-@c %**end of header
+
 
 To connect and disconnect to and from the PEERINFO Service PEERINFO
 utilizes the util client/server infrastructure, so no special messages
@@ -6460,7 +6337,7 @@ message, it can proceed with the next request if any is pending.
 @node libgnunetpeerinfo
 @subsection libgnunetpeerinfo
 
-@c %**end of header
+
 
 The PEERINFO API consists mainly of three different functionalities:
 
@@ -6479,7 +6356,7 @@ The PEERINFO API consists mainly of three different functionalities:
 @node Connecting to the PEERINFO Service
 @subsubsection Connecting to the PEERINFO Service
 
-@c %**end of header
+
 
 To connect to the PEERINFO service the function
 @code{GNUNET_PEERINFO_connect} is used, taking a configuration handle as
@@ -6490,7 +6367,7 @@ handle returned from the connect function has to be called.
 @node Adding Information to the PEERINFO Service
 @subsubsection Adding Information to the PEERINFO Service
 
-@c %**end of header
+
 
 @code{GNUNET_PEERINFO_add_peer} adds a new peer to the PEERINFO subsystem
 storage. This function takes the PEERINFO handle as an argument, the HELLO
@@ -6505,7 +6382,7 @@ can tell PEERINFO to notify if new peer information are available.
 @node Obtaining Information from the PEERINFO Service
 @subsubsection Obtaining Information from the PEERINFO Service
 
-@c %**end of header
+
 
 To iterate over information in PEERINFO you use
 @code{GNUNET_PEERINFO_iterate}.
@@ -6530,7 +6407,7 @@ with @code{GNUNET_PEERINFO_notify_cancel}.
 @node PEERSTORE Subsystem
 @section PEERSTORE Subsystem
 
-@c %**end of header
+
 
 GNUnet's PEERSTORE subsystem offers persistent per-peer storage for other
 GNUnet subsystems. GNUnet subsystems can use PEERSTORE to persistently
@@ -6554,7 +6431,7 @@ Each data record stored with PEERSTORE contains the following fields:
 @node Functionality
 @subsection Functionality
 
-@c %**end of header
+
 
 Subsystems can store any type of value under a (subsystem, peerid, key)
 combination. A "replace" flag set during store operations forces the
@@ -6580,7 +6457,7 @@ request to PEERSTORE.
 @node Architecture
 @subsection Architecture
 
-@c %**end of header
+
 
 PEERSTORE implements the following components:
 
@@ -6596,7 +6473,7 @@ only an "sqlite" plugin is implemented.
 @node libgnunetpeerstore
 @subsection libgnunetpeerstore
 
-@c %**end of header
+
 
 libgnunetpeerstore is the library containing the PEERSTORE API. Subsystems
 wishing to communicate with the PEERSTORE service use this API to open a
@@ -6644,7 +6521,7 @@ destroyed as well.
 @node SET Subsystem
 @section SET Subsystem
 
-@c %**end of header
+
 
 The SET service implements efficient set operations between two peers
 over a mesh tunnel.
@@ -6667,7 +6544,7 @@ The size of an element's data is limited to around 62 KB.
 @node Local Sets
 @subsection Local Sets
 
-@c %**end of header
+
 
 Sets created by a local client can be modified and reused for multiple
 operations. As each set operation requires potentially expensive special
@@ -6681,7 +6558,7 @@ type.
 @node Set Modifications
 @subsection Set Modifications
 
-@c %**end of header
+
 
 Even when set operations are active, one can add to and remove elements
 from a set.
@@ -6694,7 +6571,7 @@ attaching @emph{generation information} to each element and operation.
 @node Set Operations
 @subsection Set Operations
 
-@c %**end of header
+
 
 Set operations can be started in two ways: Either by accepting an
 operation request from a remote peer, or by requesting a set operation
@@ -6711,7 +6588,7 @@ request (providing a local set for the operation) or reject it.
 @node Result Elements
 @subsection Result Elements
 
-@c %**end of header
+
 
 The SET service has three @emph{result modes} that determine how an
 operation's result set is delivered to the client:
@@ -6736,7 +6613,7 @@ actually interested in the result of the set operation.
 @node libgnunetset
 @subsection libgnunetset
 
-@c %**end of header
+
 
 @menu
 * Sets::
@@ -6749,7 +6626,7 @@ actually interested in the result of the set operation.
 @node Sets
 @subsubsection Sets
 
-@c %**end of header
+
 
 New sets are created with @code{GNUNET_SET_create}. Both the local peer's
 configuration (as each set has its own client connection) and the
@@ -6765,7 +6642,7 @@ Elements are added and removed with @code{GNUNET_SET_add_element} and
 @node Listeners
 @subsubsection Listeners
 
-@c %**end of header
+
 
 Listeners are created with @code{GNUNET_SET_listen}. Each time time a
 remote peer suggests a set operation with an application id and operation
@@ -6778,7 +6655,7 @@ until the client calls @code{GNUNET_SET_commit}
 @node Operations
 @subsubsection Operations
 
-@c %**end of header
+
 
 Operations to be initiated by the local peer are created with
 @code{GNUNET_SET_prepare}. Note that the operation will not be started
@@ -6788,7 +6665,7 @@ until the client calls @code{GNUNET_SET_commit}
 @node Supplying a Set
 @subsubsection Supplying a Set
 
-@c %**end of header
+
 
 To create symmetry between the two ways of starting a set operation
 (accepting and initiating it), the operation handles returned by
@@ -6802,7 +6679,7 @@ operation.
 @node The Result Callback
 @subsubsection The Result Callback
 
-@c %**end of header
+
 
 Clients must specify both a result mode and a result callback with
 @code{GNUNET_SET_accept} and @code{GNUNET_SET_prepare}. The result
@@ -6816,7 +6693,7 @@ or if it is in the difference between the original set and the final set.
 @node The SET Client-Service Protocol
 @subsection The SET Client-Service Protocol
 
-@c %**end of header
+
 
 @menu
 * Creating Sets::
@@ -6830,7 +6707,7 @@ or if it is in the difference between the original set and the final set.
 @node Creating Sets
 @subsubsection Creating Sets
 
-@c %**end of header
+
 
 For each set of a client, there exists a client connection to the service.
 Sets are created by sending the @code{GNUNET_SERVICE_SET_CREATE} message
@@ -6841,7 +6718,7 @@ the client.
 @node Listeners2
 @subsubsection Listeners2
 
-@c %**end of header
+
 
 Each listener also requires a seperate client connection. By sending the
 @code{GNUNET_SERVICE_SET_LISTEN} message, the client notifies the service
@@ -6855,7 +6732,7 @@ is supplied for the set operation.
 @node Initiating Operations
 @subsubsection Initiating Operations
 
-@c %**end of header
+
 
 Operations with remote peers are initiated by sending a
 @code{GNUNET_SERVICE_SET_EVALUATE} message to the service. The@ client
@@ -6864,7 +6741,7 @@ connection that this message is sent by determines the set to use.
 @node Modifying Sets
 @subsubsection Modifying Sets
 
-@c %**end of header
+
 
 Sets are modified with the @code{GNUNET_SERVICE_SET_ADD} and
 @code{GNUNET_SERVICE_SET_REMOVE} messages.
@@ -6877,7 +6754,7 @@ Sets are modified with the @code{GNUNET_SERVICE_SET_ADD} and
 
 @node Results and Operation Status
 @subsubsection Results and Operation Status
-@c %**end of header
+
 
 The service notifies the client of result elements and success/failure of
 a set operation with the @code{GNUNET_SERVICE_SET_RESULT} message.
@@ -6885,7 +6762,7 @@ a set operation with the @code{GNUNET_SERVICE_SET_RESULT} message.
 @node Iterating Sets
 @subsubsection Iterating Sets
 
-@c %**end of header
+
 
 All elements of a set can be requested by sending
 @code{GNUNET_SERVICE_SET_ITER_REQUEST}. The server responds with
@@ -6898,7 +6775,7 @@ iteration may be active for a set at any given time.
 @node The SET Intersection Peer-to-Peer Protocol
 @subsection The SET Intersection Peer-to-Peer Protocol
 
-@c %**end of header
+
 
 The intersection protocol operates over CADET and starts with a
 GNUNET_MESSAGE_TYPE_SET_P2P_OPERATION_REQUEST being sent by the peer
@@ -6930,7 +6807,7 @@ just the initial handshake.
 @node The Bloom filter exchange
 @subsubsection The Bloom filter exchange
 
-@c %**end of header
+
 
 In this phase, each peer transmits a Bloom filter over the remaining
 keys of the local set to the other peer using a
@@ -6957,7 +6834,7 @@ this time as the sender.
 @node Salt
 @subsubsection Salt
 
-@c %**end of header
+
 
 Bloomfilter operations are probabilistic: With some non-zero probability
 the test may incorrectly say an element is in the set, even though it is
@@ -6977,7 +6854,7 @@ sets of the same size, and where the XOR over all keys computes the same
 @node The SET Union Peer-to-Peer Protocol
 @subsection The SET Union Peer-to-Peer Protocol
 
-@c %**end of header
+
 
 The SET union protocol is based on Eppstein's efficient set reconciliation
 without prior context. You should read this paper first if you want to
@@ -7020,7 +6897,7 @@ succeeding if they failed due to collisions before.
 @node STATISTICS Subsystem
 @section STATISTICS Subsystem
 
-@c %**end of header
+
 
 In GNUnet, the STATISTICS subsystem offers a central place for all
 subsystems to publish unsigned 64-bit integer run-time statistics.
@@ -7072,7 +6949,7 @@ to STATISTICS during shutdown.
 @node libgnunetstatistics
 @subsection libgnunetstatistics
 
-@c %**end of header
+
 
 @strong{libgnunetstatistics} is the library containing the API for the
 STATISTICS subsystem. Any process requiring to use STATISTICS should use
@@ -7103,7 +6980,7 @@ functions from the API can be used.
 @node Statistics retrieval
 @subsubsection Statistics retrieval
 
-@c %**end of header
+
 
 Once a connection to the statistics service is obtained, information
 about any other system which uses statistics can be retrieved with the
@@ -7126,7 +7003,7 @@ when we want to shutdown and cleanup everything.
 @node Setting statistics and updating them
 @subsubsection Setting statistics and updating them
 
-@c %**end of header
+
 
 So far we have seen how to retrieve statistics, here we will learn how we
 can set statistics and update them so that other subsystems can retrieve
@@ -7156,7 +7033,7 @@ to worry about sending requests too quickly.
 @node Watches
 @subsubsection Watches
 
-@c %**end of header
+
 
 As interesting feature of STATISTICS lies in serving notifications
 whenever a statistic of our interest is modified.
@@ -7176,7 +7053,7 @@ parameters that are used for registering the watch.
 
 @node The STATISTICS Client-Service Protocol
 @subsection The STATISTICS Client-Service Protocol
-@c %**end of header
+
 
 
 @menu
@@ -7188,7 +7065,7 @@ parameters that are used for registering the watch.
 @node Statistics retrieval2
 @subsubsection Statistics retrieval2
 
-@c %**end of header
+
 
 To retrieve statistics, the client transmits a message of type
 @code{GNUNET_MESSAGE_TYPE_STATISTICS_GET} containing the given subsystem
@@ -7202,7 +7079,7 @@ type @code{GNUNET_MESSAGE_TYPE_STATISTICS_END}.
 @node Setting and updating statistics
 @subsubsection Setting and updating statistics
 
-@c %**end of header
+
 
 The subsystem name, parameter name, its value and the persistence flag are
 communicated to the service through the message
@@ -7225,7 +7102,7 @@ the message should be treated as an update value.
 @node Watching for updates
 @subsubsection Watching for updates
 
-@c %**end of header
+
 
 The function registers the watch at the service by sending a message of
 type @code{GNUNET_MESSAGE_TYPE_STATISTICS_WATCH}. The service then sends
@@ -7238,7 +7115,7 @@ parameter's value is changed.
 @node Distributed Hash Table (DHT)
 @section Distributed Hash Table (DHT)
 
-@c %**end of header
+
 
 GNUnet includes a generic distributed hash table that can be used by
 developers building P2P applications in the framework.
@@ -7284,7 +7161,7 @@ loss of performance or quality of service is expected in this case).
 @node Block library and plugins
 @subsection Block library and plugins
 
-@c %**end of header
+
 
 @menu
 * What is a Block?::
@@ -7297,7 +7174,7 @@ loss of performance or quality of service is expected in this case).
 @node What is a Block?
 @subsubsection What is a Block?
 
-@c %**end of header
+
 
 Blocks are small (< 63k) pieces of data stored under a key (struct
 GNUNET_HashCode). Blocks have a type (enum GNUNET_BlockType) which defines
@@ -7314,7 +7191,7 @@ available for any type of block.
 @node The API of libgnunetblock
 @subsubsection The API of libgnunetblock
 
-@c %**end of header
+
 
 The block library requires for each (family of) block type(s) a block
 plugin (implementing @file{gnunet_block_plugin.h}) that provides basic
@@ -7346,7 +7223,7 @@ If a plugin fails to do this, responses may loop in the network.
 
 @node Queries
 @subsubsection Queries
-@c %**end of header
+
 
 The query format for any block in GNUnet consists of four main components.
 First, the type of the desired block must be specified. Second, the query
@@ -7374,7 +7251,7 @@ Depending on the results from the plugin, the DHT will then discard the
 @node Sample Code
 @subsubsection Sample Code
 
-@c %**end of header
+
 
 The source code in @strong{plugin_block_test.c} is a good starting point
 for new block plugins --- it does the minimal work by implementing a
@@ -7385,7 +7262,7 @@ block plugin.
 @node Conclusion2
 @subsubsection Conclusion2
 
-@c %**end of header
+
 
 In conclusion, GNUnet subsystems that want to use the DHT need to define a
 block format and write a plugin to match queries and replies. For testing,
@@ -7399,7 +7276,7 @@ of error checking that results from this primitive implementation.
 @node libgnunetdht
 @subsection libgnunetdht
 
-@c %**end of header
+
 
 The DHT API itself is pretty simple and offers the usual GET and PUT
 functions that work as expected. The specified block type refers to the
@@ -7417,7 +7294,7 @@ data stored in the network.
 @node GET
 @subsubsection GET
 
-@c %**end of header
+
 
 When using GET, the main consideration for developers (other than the
 block library) should be that after issuing a GET, the DHT will
@@ -7445,7 +7322,7 @@ bandwidth consumption.
 @node PUT
 @subsubsection PUT
 
-@c %**end of header
+
 
 @c inconsistent use of ``must'' above it's written ``MUST''
 In contrast to GET operations, developers @strong{must} manually re-run
@@ -7467,7 +7344,7 @@ DHT PUT operations should be repeated at least every 1-2 hours.
 @node MONITOR
 @subsubsection MONITOR
 
-@c %**end of header
+
 
 The DHT API also allows applications to monitor messages crossing the
 local DHT service.
@@ -7490,7 +7367,7 @@ number of workers will process the distributed workload.
 @node DHT Routing Options
 @subsubsection DHT Routing Options
 
-@c %**end of header
+
 
 There are two important options for GET and PUT requests:
 
@@ -7520,7 +7397,7 @@ in the future offer performance improvements for clique topologies.
 @node The DHT Client-Service Protocol
 @subsection The DHT Client-Service Protocol
 
-@c %**end of header
+
 
 @menu
 * PUTting data into the DHT::
@@ -7531,7 +7408,7 @@ in the future offer performance improvements for clique topologies.
 @node PUTting data into the DHT
 @subsubsection PUTting data into the DHT
 
-@c %**end of header
+
 
 To store (PUT) data into the DHT, the client sends a
 @code{struct GNUNET_DHT_ClientPutMessage} to the service.
@@ -7552,7 +7429,7 @@ in the P2P interaction.
 @node GETting data from the DHT
 @subsubsection GETting data from the DHT
 
-@c %**end of header
+
 
 To retrieve (GET) data from the DHT, the client sends a
 @code{struct GNUNET_DHT_ClientGetMessage} to the service. The message
@@ -7591,7 +7468,7 @@ service --- and to stop them individually.
 @node Monitoring the DHT
 @subsubsection Monitoring the DHT
 
-@c %**end of header
+
 
 To begin monitoring, the client sends a
 @code{struct GNUNET_DHT_MonitorStartStop} message to the DHT service.
@@ -7606,7 +7483,7 @@ these messages contains all of the information about the event.
 
 @node The DHT Peer-to-Peer Protocol
 @subsection The DHT Peer-to-Peer Protocol
-@c %**end of header
+
 
 
 @menu
@@ -7618,7 +7495,7 @@ these messages contains all of the information about the event.
 @node Routing GETs or PUTs
 @subsubsection Routing GETs or PUTs
 
-@c %**end of header
+
 
 When routing GETs or PUTs, the DHT service selects a suitable subset of
 neighbours for forwarding. The exact number of neighbours can be zero or
@@ -7633,7 +7510,7 @@ traversed; those peers are also excluded from the selection.
 @node PUTting data into the DHT2
 @subsubsection PUTting data into the DHT2
 
-@c %**end of header
+
 
 To PUT data into the DHT, the service sends a @code{struct PeerPutMessage}
 of type @code{GNUNET_MESSAGE_TYPE_DHT_P2P_PUT} to the respective
@@ -7655,7 +7532,7 @@ its own identity (this is done to reduce bandwidth).
 @node GETting data from the DHT2
 @subsubsection GETting data from the DHT2
 
-@c %**end of header
+
 
 A peer can search the DHT by sending @code{struct PeerGetMessage}s of type
 @code{GNUNET_MESSAGE_TYPE_DHT_P2P_GET} to other peers. In addition to the
@@ -7694,7 +7571,7 @@ The DHT service may also cache forwarded results locally if the
 @node GNU Name System (GNS)
 @section GNU Name System (GNS)
 
-@c %**end of header
+
 
 The GNU Name System (GNS) is a decentralized database that enables users
 to securely resolve names to values.
@@ -7749,7 +7626,7 @@ record types.
 @node libgnunetgns
 @subsection libgnunetgns
 
-@c %**end of header
+
 
 The GNS API itself is extremely simple. Clients first connect to the
 GNS service using @code{GNUNET_GNS_connect}.
@@ -7767,7 +7644,7 @@ Once finished, clients disconnect using @code{GNUNET_GNS_disconnect}.
 @node Looking up records
 @subsubsection Looking up records
 
-@c %**end of header
+
 
 @code{GNUNET_GNS_lookup} takes a number of arguments:
 
@@ -7809,7 +7686,7 @@ must no longer be canceled.
 @node Accessing the records
 @subsubsection Accessing the records
 
-@c %**end of header
+
 
 The @code{libgnunetgnsrecord} library provides an API to manipulate the
 GNS record array that is given to proc. In particular, it offers
@@ -7823,7 +7700,7 @@ functions for parsing (and serializing) common types of DNS records.
 @node Creating records
 @subsubsection Creating records
 
-@c %**end of header
+
 
 Creating GNS records is typically done by building the respective record
 information (possibly with the help of @code{libgnunetgnsrecord} and
@@ -7834,7 +7711,7 @@ operation.
 @node Future work
 @subsubsection Future work
 
-@c %**end of header
+
 
 In the future, we want to expand @code{libgnunetgns} to allow
 applications to observe shortening operations performed during GNS
@@ -7844,7 +7721,7 @@ this happens.
 @node libgnunetgnsrecord
 @subsection libgnunetgnsrecord
 
-@c %**end of header
+
 
 The @code{libgnunetgnsrecord} library is used to manipulate GNS
 records (in plaintext or in their encrypted format).
@@ -7870,7 +7747,7 @@ standard GNS record types.
 @node Value handling
 @subsubsection Value handling
 
-@c %**end of header
+
 
 @code{GNUNET_GNSRECORD_value_to_string} can be used to convert
 the (binary) representation of a GNS record value to a human readable,
@@ -7885,7 +7762,7 @@ a GNS record value.
 @node Type handling
 @subsubsection Type handling
 
-@c %**end of header
+
 
 @code{GNUNET_GNSRECORD_typename_to_number} can be used to obtain the
 numeric value associated with a given typename. For example, given the
@@ -7903,7 +7780,7 @@ typename "A".
 @node GNS plugins
 @subsection GNS plugins
 
-@c %**end of header
+
 
 Adding a new GNS record type typically involves writing (or extending) a
 GNSRECORD plugin. The plugin needs to implement the
@@ -7929,7 +7806,7 @@ typenames and numbers documented in the previous subsection.
 
 @node The GNS Client-Service Protocol
 @subsection The GNS Client-Service Protocol
-@c %**end of header
+
 
 The GNS client-service protocol consists of two simple messages, the
 @code{LOOKUP} message and the @code{LOOKUP_RESULT}. Each @code{LOOKUP}
@@ -7949,7 +7826,7 @@ They can thus be deserialized using
 @node Hijacking the DNS-Traffic using gnunet-service-dns
 @subsection Hijacking the DNS-Traffic using gnunet-service-dns
 
-@c %**end of header
+
 
 This section documents how the gnunet-service-dns (and the
 gnunet-helper-dns) intercepts DNS queries from the local system.
@@ -7986,7 +7863,7 @@ interface with the original nameserver as source address.
 @node Network Setup Details
 @subsubsection Network Setup Details
 
-@c %**end of header
+
 
 The DNS interceptor adds the following rules to the Linux kernel:
 @example
@@ -8007,7 +7884,7 @@ arbitrarily). The third line adds a routing policy based on this mark
 @node Serving DNS lookups via GNS on W32
 @subsection Serving DNS lookups via GNS on W32
 
-@c %**end of header
+
 
 This section documents how the libw32nsp (and
 gnunet-gns-helper-service-w32) do DNS resolutions of DNS queries on the
@@ -8077,13 +7954,17 @@ This includes some of well known utilities, like "ping" and "nslookup".
 @node Importing DNS Zones into GNS
 @subsection Importing DNS Zones into GNS
 
-@c %**end of header
+This section discusses the challenges and problems faced when writing the
+Ascension tool. It also takes a look at possible improvements in the
+future.
+
+Consider the following diagram that shows the workflow of Ascension:
 
-This section will mainly comprise of the challenges and problems faced when
-writing the ascension tool.
+@image{images/ascension_ssd,6in,,Ascensions workflow}
 
-When considering to migrate existing into GNS there are a few things to
-consider.
+Further the interaction between components of GNUnet are shown in the diagram
+below:
+@center @image{images/ascension_interaction,,6in,Ascensions workflow}
 
 @menu
 * Conversions between DNS and GNS::
@@ -8091,32 +7972,31 @@ consider.
 * Performance::
 @end menu
 
+@cindex DNS Conversion
 @node Conversions between DNS and GNS
 @subsubsection Conversions between DNS and GNS
 
-The differences between the two name systems lies in the details
-and is not visible from the start. For instance an SRV record is converted to a
-gnunet only BOX record.
+The differences between the two name systems lies in the details and is not
+always transparent.  For instance an SRV record is converted to a BOX record
+which is unique to GNS.
 
-This is done by building a BOX record from an existing SRV record:
+This is done by converting to a BOX record from an existing SRV record:
 
 @example
+# SRV
 # _service._proto.name. TTL class SRV priority weight port target
-_sip._tcp.example.com. 14000 IN        SRV     0 0 5060 www.example.com.
-@end example
-
-Which can be transformed to a GNS BOX record by converting it like this:
-
-@example
+_sip._tcp.example.com. 14000 IN SRV     0 0 5060 www.example.com.
+# BOX
 # TTL BOX flags port protocol recordtype priority weight port target
 14000 BOX n 5060 6 33 0 0 5060 www.example.com
 @end example
 
-Other records that have such a transformation is the MX record type, as well as
-the SOA record type.
+Other records that need to undergo such transformation is the MX record type,
+as well as the SOA record type.
+
+Transformation of a SOA record into GNS works as described in the
+following example. Very important to note are the rname and mname keys.
 
-Transformation of a SOA record into GNS works as described in the following
-example. Very important to note are the rname and mname keys.
 @example
 # BIND syntax for a clean SOA record
 @   IN SOA master.example.com. hostmaster.example.com. (
@@ -8126,40 +8006,83 @@ example. Very important to note are the rname and mname keys.
     604800     ; expire
     600 )      ; ttl
 # Recordline for adding the record
-gnunet-namestore -z example.com -a -n @ -t SOA -V rname=master.example.com \
-    mname=hostmaster.example.com 2017030300,3600,1800,604800,600 -e 7200s
+$ gnunet-namestore -z example.com -a -n @ -t SOA -V \
+    rname=master.example.com mname=hostmaster.example.com  \
+    2017030300,3600,1800,604800,600 -e 7200s
 @end example
 
 The transformation of MX records is done in a simple way.
 @example
 # mail.example.com. 3600 IN MX 10 mail.example.com.
-gnunet-namestore -z example.com -n mail -R 3600 MX n 10,mail
+gnunet-namestore -z example.com -n mail -R 3600 MX n 10,mail
 @end example
 
-Finally, one of the biggest struggling points was the NS records that are found
-in top level domain zones. The inteded behaviour for those is to add GNS2DNS
-records for the zone so that gnunet-gns can resolve the for those domain on it's
-own. Also a very important aspect of this is, that gnunet needs to be able to
-resolve the nameservers from it's own database. This requires migration of the
-DNS GLUE records as well.
+Finally, one of the biggest struggling points were the NS records that are
+found in top level domain zones. The intended behaviour for those is to add
+GNS2DNS records for those so that gnunet-gns can resolve records for those
+domains on its own. Those require the values from DNS GLUE records, provided
+they are within the same zone.
+
+The following two examples show one record with a GLUE record and the other one
+does not have a GLUE record. This takes place in the 'com' TLD.
 
-This proved to be quite a challenge to implement, as in GNS every dot is a
-strict zone cut.
+@example
+# ns1.example.com 86400 IN A 127.0.0.1
+# example.com 86400 IN NS ns1.example.com.
+$ gnunet-namestore -z com -n example -R 86400 GNS2DNS n \
+    example.com@@127.0.0.1
+
+# example.com 86400 IN NS ns1.example.org.
+$ gnunet-namestore -z com -n example -R 86400 GNS2DNS n \
+    example.com@@ns1.example.org
+@end example
 
-The issue was fixed by creating a hierarchical zone structure in GNS and linking
+As you can see, one of the GNS2DNS records has an IP address listed and the
+other one a DNS name. For the first one there is a GLUE record to do the
+translation directly and the second one will issue another DNS query to figure
+out the IP of ns1.example.org.
+
+A solution was found by creating a hierarchical zone structure in GNS and linking
 the zones using PKEY records to one another. This allows the resolution of the
-nameservers to work within GNS.
+name servers to work within GNS while not taking control over unwanted zones.
+
+Currently the following record types are supported:
+@itemize @bullet
+@item A
+@item AAAA
+@item CNAME
+@item MX
+@item NS
+@item SRV
+@item TXT
+@end itemize
+
+This is not due to technical limitations but rather a practical ones. The
+problem occurs with DNSSEC enabled DNS zones. As records within those zones are
+signed periodically, and every new signature is an update to the zone, there are
+many revisions of zones. This results in a problem with bigger zones as there
+are lots of records that have been signed again but no major changes.  Also
+trying to add records that are unknown that require a different format take time
+as they cause a CLI call of the namestore.  Furthermore certain record types
+need transformation into a GNS compatible format which, depending on the record
+type, takes more time.
+
+Further a blacklist was added to drop for instance DNSSEC related records. Also
+if a record type is neither in the white list nor the blacklist it is considered
+as a loss of data and a message is shown to the user. This helps with
+transparency and also with contributing, as the not supported record types can
+then be added accordingly.
 
 @node DNS Zone Size
 @subsubsection DNS Zone Size
-
 Another very big problem exists with very large zones. When migrating a small
 zone the delay between adding of records and their expiry is negligible. However
-when working with a TLD zone that has more that 1 million records this delay
-becomes a problem.
+when working with big zones that easily have more than a few million records
+this delay becomes a problem.
 
 Records will start to expire well before the zone has finished migrating. This
-causes unwanted anomalies when trying to resolve records.
+is usually not a problem but can cause a high CPU load when a peer is restarted
+and the records have expired.
 
 A good solution has not been found yet. One of the idea that floated around was
 that the records should be added with the s (shadow) flag to keep the records
@@ -8167,37 +8090,53 @@ resolvable even if they expired. However this would introduce the problem of how
 to detect if a record has been removed from the zone and would require deletion
 of said record(s).
 
+Another problem that still persists is how to refresh records. Expired records
+are still displayed when calling gnunet-namestore but do not resolve with
+gnunet-gns. Zonemaster will sign the expired records again and make sure that
+the records are still valid. With a recent change this was fixed as gnunet-gns
+to improve the suffix lookup which allows for a fast lookup even with thousands
+of local egos.
+
+Currently the pace of adding records in general is around 10 records per second.
+Crypto is the upper limit for adding of records. The performance of your machine
+can be tested with the perf_crypto_* tools. There is still a big discrepancy
+between the pace of Ascension and the theoretical limit.
+
+A performance metric for measuring improvements has not yet been implemented in
+Ascension.
+
 @node Performance
 @subsubsection Performance
-The performance when migrating a zone using the ascension tool is limited by a
-handful of factors. First of all ascension is written in python3 and calls the
-CLI tools of gnunet. Furthermore all the records that are added to the same
+The performance when migrating a zone using the Ascension tool is limited by a
+handful of factors. First of all ascension is written in Python3 and calls the
+CLI tools of GNUnet. This is comparable to a fork and exec call which costs a
+few CPU cycles. Furthermore all the records that are added to the same
 label are signed using the zones private key. This signing operation is very
 resource heavy and was optimized during development by adding the '-R'
-(Recordline) option to gnunet-namestore. This allows to add multiple records
-at once using the CLI.
-
-The result of this was a much faster migration of TLD zones, as most records
-with the same label have two nameservers.
+(Recordline) option to gnunet-namestore which allows to specify multiple records
+using the CLI tool. Assuming that in a TLD zone every domain has at least two
+name servers this halves the amount of signatures needed.
 
 Another improvement that could be made is with the addition of multiple threads
-when opening the gnunet CLI tools. This could be implemented by simply creating
-more workers in the program but performance improvements were not tested.
+or using asynchronous subprocesses when opening the GNUnet CLI tools. This could
+be implemented by simply creating more workers in the program but performance
+improvements were not tested.
 
-During the entire development of the ascension tool sqlite was used as a
-database backend. Other backends need to be tested in the future.
+Ascension was tested using different hardware and database backends. Performance
+differences between SQLite and postgresql are marginal and almost non existent.
+What did make a huge impact on record adding performance was the storage medium.
+On a traditional mechanical hard drive adding of records were slow compared to a
+solid state disk.
 
 In conclusion there are many bottlenecks still around in the program, namely the
-signing process and the single threaded implementation. In the future a solution
-that uses the c api would be cleaner and better.
-
+single threaded implementation and inefficient, sequential calls of
+gnunet-namestore. In the future a solution that uses the C API would be cleaner
+and better.
 
 @cindex GNS Namecache
 @node GNS Namecache
 @section GNS Namecache
 
-@c %**end of header
-
 The NAMECACHE subsystem is responsible for caching (encrypted) resolution
 results of the GNU Name System (GNS). GNS makes zone information available
 to other users via the DHT. However, as accessing the DHT for every
@@ -8235,7 +8174,7 @@ plugin API.
 @node libgnunetnamecache
 @subsection libgnunetnamecache
 
-@c %**end of header
+
 
 The NAMECACHE API consists of five simple functions. First, there is
 @code{GNUNET_NAMECACHE_connect} to connect to the NAMECACHE service.
@@ -8258,7 +8197,7 @@ The maximum size of a block that can be stored in the NAMECACHE is
 @node The NAMECACHE Client-Service Protocol
 @subsection The NAMECACHE Client-Service Protocol
 
-@c %**end of header
+
 
 All messages in the NAMECACHE IPC protocol start with the
 @code{struct GNUNET_NAMECACHE_Header} which adds a request
@@ -8276,7 +8215,7 @@ out-of-order.
 @node Lookup
 @subsubsection Lookup
 
-@c %**end of header
+
 
 The @code{struct LookupBlockMessage} is used to lookup a block stored in
 the cache.
@@ -8290,7 +8229,7 @@ of the block.
 @node Store
 @subsubsection Store
 
-@c %**end of header
+
 
 The @code{struct BlockCacheMessage} is used to cache a block in the
 NAMECACHE.
@@ -8302,7 +8241,7 @@ message as well.
 
 @node The NAMECACHE Plugin API
 @subsection The NAMECACHE Plugin API
-@c %**end of header
+
 
 The NAMECACHE plugin API consists of two functions, @code{cache_block} to
 store a block in the database, and @code{lookup_block} to lookup a block
@@ -8317,7 +8256,7 @@ in the database.
 @node Lookup2
 @subsubsection Lookup2
 
-@c %**end of header
+
 
 The @code{lookup_block} function is expected to return at most one block
 to the iterator, and return @code{GNUNET_NO} if there were no non-expired
@@ -8328,7 +8267,7 @@ supposed to return the result with the largest expiration time.
 @node Store2
 @subsubsection Store2
 
-@c %**end of header
+
 
 The @code{cache_block} function is expected to try to store the block in
 the database, and return @code{GNUNET_SYSERR} if this was not possible
@@ -8345,7 +8284,7 @@ block is more recent during the store operation.
 @cindex REVOCATION Subsystem
 @node REVOCATION Subsystem
 @section REVOCATION Subsystem
-@c %**end of header
+
 
 The REVOCATION subsystem is responsible for key revocation of Egos.
 If a user learns that theis private key has been compromised or has lost
@@ -8365,7 +8304,7 @@ propagate revocation messages.
 @node Dissemination
 @subsection Dissemination
 
-@c %**end of header
+
 
 When a revocation is performed, the revocation is first of all
 disseminated by flooding the overlay network.
@@ -8389,7 +8328,7 @@ The SET service is used to perform this operation efficiently.
 @node Revocation Message Design Requirements
 @subsection Revocation Message Design Requirements
 
-@c %**end of header
+
 
 However, flooding is also quite costly, creating O(|E|) messages on a
 network with |E| edges.
@@ -8411,7 +8350,7 @@ revocation message ahead of time and store it in a secure location.
 @node libgnunetrevocation
 @subsection libgnunetrevocation
 
-@c %**end of header
+
 
 The REVOCATION API consists of two parts, to query and to issue
 revocations.
@@ -8426,7 +8365,7 @@ revocations.
 @node Querying for revoked keys
 @subsubsection Querying for revoked keys
 
-@c %**end of header
+
 
 @code{GNUNET_REVOCATION_query} is used to check if a given ECDSA public
 key has been revoked.
@@ -8437,7 +8376,7 @@ the return value.
 @node Preparing revocations
 @subsubsection Preparing revocations
 
-@c %**end of header
+
 
 It is often desirable to create a revocation record ahead-of-time and
 store it in an off-line location to be used later in an emergency.
@@ -8505,7 +8444,7 @@ successfully.
 @node The REVOCATION Peer-to-Peer Protocol
 @subsection The REVOCATION Peer-to-Peer Protocol
 
-@c %**end of header
+
 
 Revocation uses two disjoint ways to spread revocation information among
 peers.
@@ -8540,7 +8479,7 @@ larger hashed peer identity.
 @node File-sharing (FS) Subsystem
 @section File-sharing (FS) Subsystem
 
-@c %**end of header
+
 
 This chapter describes the details of how the file-sharing service works.
 As with all services, it is split into an API (libgnunetfs), the service
@@ -8578,7 +8517,7 @@ NOTE: The documentation in this chapter is quite incomplete.
 @node Encoding for Censorship-Resistant Sharing (ECRS)
 @subsection Encoding for Censorship-Resistant Sharing (ECRS)
 
-@c %**end of header
+
 
 When GNUnet shares files, it uses a content encoding that is called ECRS,
 the Encoding for Censorship-Resistant Sharing.
@@ -8600,7 +8539,7 @@ thus did not warrant space in the research report.
 @node Namespace Advertisements
 @subsubsection Namespace Advertisements
 
-@c %**end of header
+
 @c %**FIXME: all zeroses -> ?
 
 An @code{SBlock} with identifier all zeros is a signed
@@ -8615,7 +8554,7 @@ can search for @code{SBlock}s in order to find out more about a namespace.
 @node KSBlocks
 @subsubsection KSBlocks
 
-@c %**end of header
+
 
 GNUnet implements @code{KSBlocks} which are @code{KBlocks} that, instead
 of encrypting a CHK and metadata, encrypt an @code{SBlock} instead.
@@ -8636,12 +8575,12 @@ eliminate the need to first create a directory.
 
 Collections are also advertised using @code{KSBlock}s.
 
-@c https://gnunet.org/sites/default/files/ecrs.pdf
+@c https://old.gnunet.org/sites/default/files/ecrs.pdf
 
 @node File-sharing persistence directory structure
 @subsection File-sharing persistence directory structure
 
-@c %**end of header
+
 
 This section documents how the file-sharing library implements
 persistence of file-sharing operations and specifically the resulting
@@ -8727,7 +8666,7 @@ Note that unindex operations cannot have associated child operations.
 @node REGEX Subsystem
 @section REGEX Subsystem
 
-@c %**end of header
+
 
 Using the REGEX subsystem, you can discover peers that offer a particular
 service using regular expressions.
@@ -8750,13 +8689,13 @@ thesis.
 @node How to run the regex profiler
 @subsection How to run the regex profiler
 
-@c %**end of header
+
 
 The gnunet-regex-profiler can be used to profile the usage of mesh/regex
 for a given set of regular expressions and strings.
 Mesh/regex allows you to announce your peer ID under a certain regex and
 search for peers matching a particular regex using a string.
-See @uref{https://gnunet.org/szengel2012ms, szengel2012ms} for a full
+See @uref{https://old.gnunet.org/szengel2012ms, szengel2012ms} for a full
 introduction.
 
 First of all, the regex profiler uses GNUnet testbed, thus all the
@@ -8883,7 +8822,7 @@ regular expressions.
 @node REST Subsystem
 @section REST Subsystem
 
-@c %**end of header
+
 
 Using the REST subsystem, you can expose REST-based APIs or services.
 The REST service is designed as a pluggable architecture.
@@ -8934,3 +8873,71 @@ so please make sure that endpoints are unambiguous.
 This is WIP. Endpoints should be documented appropriately.
 Preferably using annotations.
 
+
+@cindex RPS Subsystem
+@node RPS Subsystem
+@section RPS Subsystem
+
+In literature, Random Peer Sampling (RPS) refers to the problem of
+reliably drawing random samples from an unstructured p2p network.
+
+Doing so in a reliable manner is not only hard because of inherent
+problems but also because of possible malicious peers that could try to
+bias the selection.
+
+It is useful for all kind of gossip protocols that require the selection
+of random peers in the whole network like gathering statistics,
+spreading and aggregating information in the network, load balancing and
+overlay topology management.
+
+The approach chosen in the rps implementation in GNUnet follows the
+Brahms@uref{https://bib.gnunet.org/full/date.html\#2009_5f0} design.
+
+The current state is "work in progress". There are a lot of things that
+need to be done, primarily finishing the experimental evaluation and a
+re-design of the API.
+
+The abstract idea is to subscribe to connect to/start the rps service
+and request random peers that will be returned when they represent a
+random selection from the whole network with high probability.
+
+An additional feature to the original Brahms-design is the selection of
+sub-groups: The GNUnet implementation of rps enables clients to ask for
+random peers from a group that is defined by a common shared secret.
+(The secret could of course also be public, depending on the use-case.)
+
+Another addition to the original protocol was made: The sampler
+mechanism that was introduced in Brahms was slightly adapted and used to
+actually sample the peers and returned to the client.
+This is necessary as the original design only keeps peers connected to
+random other peers in the network. In order to return random peers to
+client requests independently random, they cannot be drawn from the
+connected peers.
+The adapted sampler makes sure that each request for random peers is
+independent from the others.
+
+@node Brahms
+@subsection Brahms
+The high-level concept of Brahms is two-fold: Combining push-pull gossip
+with locally fixing a assumed bias using cryptographic min-wise
+permutations.
+The central data structure is the view - a peer's current local sample.
+This view is used to select peers to push to and pull from.
+This simple mechanism can be biased easily. For this reason Brahms
+'fixes' the bias by using the so-called sampler. A data structure that
+takes a list of elements as input and outputs a random one of them
+independently of the frequency in the input set. Both an element that
+was put into the sampler a single time and an element that was put into
+it a million times have the same probability of being the output.
+This is achieved this is achieved with exploiting min-wise independent
+permutations. In rps we use HMACs: On the initialisation of a sampler
+element, a key is chosen at random. On each input the HMAC with the
+random key is computed. The sampler element keeps the element with the
+minimal HMAC.
+
+In order to fix the bias in the view, a fraction of the elements in the
+view are sampled through the sampler from the random stream of peer IDs.
+
+According to the theoretical analysis of Bortnikov et al. this suffices
+to keep the network connected and having random peers in the view.
+