aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorng0 <ng0@infotropique.org>2017-09-06 09:43:52 +0000
committerng0 <ng0@infotropique.org>2017-09-06 09:43:52 +0000
commit6a2067a3a386856869c60cbf32463947f9f87c5e (patch)
tree15d7e15da1437f0cf334ff5e7d6019e7eba36955 /doc
parentd5224cf485343f445dead0516d991d0c5cee644b (diff)
downloadgnunet-6a2067a3a386856869c60cbf32463947f9f87c5e.tar.gz
gnunet-6a2067a3a386856869c60cbf32463947f9f87c5e.zip
doc: gnunet-c-tutorial: Add nodes.
Diffstat (limited to 'doc')
-rw-r--r--doc/gnunet-c-tutorial.texi63
1 files changed, 51 insertions, 12 deletions
diff --git a/doc/gnunet-c-tutorial.texi b/doc/gnunet-c-tutorial.texi
index 824834c92..156b6a14e 100644
--- a/doc/gnunet-c-tutorial.texi
+++ b/doc/gnunet-c-tutorial.texi
@@ -58,7 +58,7 @@ important and do not hesitate to contact the GNUnet team if you have
58any questions or problems! Check here how to contact the GNUnet 58any questions or problems! Check here how to contact the GNUnet
59team: @uref{https://gnunet.org/contact_information} 59team: @uref{https://gnunet.org/contact_information}
60 60
61 61@node Installing GNUnet
62@section Installing GNUnet 62@section Installing GNUnet
63 63
64First of all you have to install a current version of GNUnet. You can download a 64First of all you have to install a current version of GNUnet. You can download a
@@ -70,6 +70,7 @@ latest development version things can be broken, functionality can be changed or
70can fail. You should only use the development version if you know that you require a 70can fail. You should only use the development version if you know that you require a
71certain feature or a certain issue has been fixed since the last release. 71certain feature or a certain issue has been fixed since the last release.
72 72
73@node Obtaining a stable version
73@subsection Obtaining a stable version 74@subsection Obtaining a stable version
74 75
75You can download the latest stable version of GNUnet from GNU FTP mirrors: 76You can download the latest stable version of GNUnet from GNU FTP mirrors:
@@ -95,6 +96,7 @@ $ cd gnunet
95However, please note that stable versions can be very outdated, as a developer 96However, please note that stable versions can be very outdated, as a developer
96you are strongly encouraged to use the version from @uref{https://gnunet.org/git/}. 97you are strongly encouraged to use the version from @uref{https://gnunet.org/git/}.
97 98
99@node Installing Build Tool Chain and Dependencies
98@subsection Installing Build Tool Chain and Dependencies 100@subsection Installing Build Tool Chain and Dependencies
99 101
100To successfully compile GNUnet you need the tools to build GNUnet and the required dependencies. 102To successfully compile GNUnet you need the tools to build GNUnet and the required dependencies.
@@ -107,6 +109,7 @@ For GNUnet bootstrapping support and the http(s) plugin you should install libgn
107For the filesharing service you should install at least one of the datastore backends mysql, 109For the filesharing service you should install at least one of the datastore backends mysql,
108sqlite or postgresql. 110sqlite or postgresql.
109 111
112@node Obtaining the latest version from Git
110@subsection Obtaining the latest version from Git 113@subsection Obtaining the latest version from Git
111 114
112The latest development version can obtained from our Git repository. To obtain 115The latest development version can obtained from our Git repository. To obtain
@@ -122,6 +125,7 @@ $ ./bootstrap
122 125
123The remainder of this tutorial assumes that you have Git branch ``master'' checked out. 126The remainder of this tutorial assumes that you have Git branch ``master'' checked out.
124 127
128@node Compiling and Installing GNUnet
125@subsection Compiling and Installing GNUnet 129@subsection Compiling and Installing GNUnet
126 130
127First, you need to install at least libgnupgerror version 1.27 131First, you need to install at least libgnupgerror version 1.27
@@ -146,6 +150,7 @@ $ sudo make install
146$ cd .. 150$ cd ..
147@end example 151@end example
148 152
153@node Installing GNUnet
149@subsubsection Installing GNUnet 154@subsubsection Installing GNUnet
150Assuming all dependencies are installed, the following commands will 155Assuming all dependencies are installed, the following commands will
151compile and install GNUnet in your home directory. You can specify the 156compile and install GNUnet in your home directory. You can specify the
@@ -173,6 +178,7 @@ $ mkdir ~/.config/
173$ touch ~/.config/gnunet.conf 178$ touch ~/.config/gnunet.conf
174@end example 179@end example
175 180
181@node Common Issues - Check your GNUnet installation
176@subsection Common Issues - Check your GNUnet installation 182@subsection Common Issues - Check your GNUnet installation
177 183
178You should check your installation to ensure that installing GNUnet 184You should check your installation to ensure that installing GNUnet
@@ -204,6 +210,7 @@ PASS: test_gnunet_prefix
204============= 210=============
205@end example 211@end example
206 212
213@node Background: GNUnet Architecture
207@section Background: GNUnet Architecture 214@section Background: GNUnet Architecture
208 215
209GNUnet is organized in layers and services. Each service is composed of a 216GNUnet is organized in layers and services. Each service is composed of a
@@ -247,9 +254,10 @@ client do not affect the service process or other clients. The service and the
247clients communicate via a message protocol to be defined and implemented by 254clients communicate via a message protocol to be defined and implemented by
248the programmer. 255the programmer.
249 256
250 257@node First Steps with GNUnet
251@section First Steps with GNUnet 258@section First Steps with GNUnet
252 259
260@node Configure your peer
253@subsection Configure your peer 261@subsection Configure your peer
254 262
255First of all we need to configure your peer. Each peer is started with a configuration 263First of all we need to configure your peer. Each peer is started with a configuration
@@ -280,6 +288,7 @@ GNUNET_HOME = ~/gnunet1/ # Use this directory to store GNUnet data
280SERVERS = # prevent bootstrapping 288SERVERS = # prevent bootstrapping
281@end example 289@end example
282 290
291@node Start a peer
283@subsection Start a peer 292@subsection Start a peer
284Each GNUnet instance (called peer) has an identity (peer ID) based on a 293Each GNUnet instance (called peer) has an identity (peer ID) based on a
285cryptographic public private key pair. The peer ID is the printable hash of the 294cryptographic public private key pair. The peer ID is the printable hash of the
@@ -304,7 +313,7 @@ You should see an output containing the peer ID similar to:
304I am peer `0PA02UVRKQTS2C .. JL5Q78F6H0B1ACPV1CJI59MEQUMQCC5G'. 313I am peer `0PA02UVRKQTS2C .. JL5Q78F6H0B1ACPV1CJI59MEQUMQCC5G'.
305@end example 314@end example
306 315
307 316@node Monitor a peer
308@subsection Monitor a peer 317@subsection Monitor a peer
309 318
310In this section, we will monitor the behaviour of our peer's DHT service with respect to a 319In this section, we will monitor the behaviour of our peer's DHT service with respect to a
@@ -328,7 +337,7 @@ $ gnunet-statistics -c ~/peer1.conf # print statistics about current GNUnet sta
328$ gnunet-statistics -c ~/peer1.conf -s dht # print statistics about DHT service 337$ gnunet-statistics -c ~/peer1.conf -s dht # print statistics about DHT service
329@end example 338@end example
330 339
331 340@node Starting Two Peers by Hand
332@subsection Starting Two Peers by Hand 341@subsection Starting Two Peers by Hand
333 342
334This section describes how to start two peers on the same machine by hand. 343This section describes how to start two peers on the same machine by hand.
@@ -336,6 +345,7 @@ The process is rather painful, but the description is somewhat instructive.
336In practice, you might prefer the automated method 345In practice, you might prefer the automated method
337(@pxref{Starting Peers Using the Testbed Service}). 346(@pxref{Starting Peers Using the Testbed Service}).
338 347
348@node Setup a second peer
339@subsubsection Setup a second peer 349@subsubsection Setup a second peer
340We will now start a second peer on your machine. 350We will now start a second peer on your machine.
341For the second peer, you will need to manually create a modified 351For the second peer, you will need to manually create a modified
@@ -375,6 +385,7 @@ as needed. Also, make sure the output is different from the
375gnunet-peerinfo output for the first peer (otherwise you made an 385gnunet-peerinfo output for the first peer (otherwise you made an
376error in the configuration). 386error in the configuration).
377 387
388@node Start the second peer and connect the peers
378@subsubsection Start the second peer and connect the peers 389@subsubsection Start the second peer and connect the peers
379 390
380Then, you can start a second peer using: 391Then, you can start a second peer using:
@@ -413,6 +424,7 @@ tricky as you're going to be connected to many more peers and would
413likely observe traffic and behaviors that are not explicitly controlled 424likely observe traffic and behaviors that are not explicitly controlled
414by you. 425by you.
415 426
427@node How to connect manually
416@subsubsection How to connect manually 428@subsubsection How to connect manually
417 429
418If you want to use the @code{peerinfo} tool to connect your peers, you should: 430If you want to use the @code{peerinfo} tool to connect your peers, you should:
@@ -430,6 +442,7 @@ $ gnunet-core -c peer1.conf
430Peer `9TVUCS8P5A7ILLBGO6 [...shortened...] 1KNBJ4NGCHP3JPVULDG' 442Peer `9TVUCS8P5A7ILLBGO6 [...shortened...] 1KNBJ4NGCHP3JPVULDG'
431@end example 443@end example
432 444
445@node Starting Peers Using the Testbed Service
433@subsection Starting Peers Using the Testbed Service 446@subsection Starting Peers Using the Testbed Service
434@c \label{sec:testbed} 447@c \label{sec:testbed}
435 448
@@ -518,9 +531,10 @@ options in the configuration file. See @uref{https://gnunet.org/supported-topolo
518Then use the DHT API to store and retrieve values in the 531Then use the DHT API to store and retrieve values in the
519network. 532network.
520 533
521 534@node Developing Applications
522@section Developing Applications 535@section Developing Applications
523 536
537@node gnunet-ext
524@subsection gnunet-ext 538@subsection gnunet-ext
525To develop a new peer-to-peer application or to extend GNUnet we provide 539To develop a new peer-to-peer application or to extend GNUnet we provide
526a template build system for writing GNUnet extensions in C. It can be 540a template build system for writing GNUnet extensions in C. It can be
@@ -560,6 +574,7 @@ In addition the ext systems provides:
560@item a configuration template for the service (gnunet-ext/src/ext/ext.conf.in) 574@item a configuration template for the service (gnunet-ext/src/ext/ext.conf.in)
561@end itemize 575@end itemize
562 576
577@node Adapting the Template
563@subsection Adapting the Template 578@subsection Adapting the Template
564 579
565The first step for writing any extension with a new service is to 580The first step for writing any extension with a new service is to
@@ -571,6 +586,7 @@ If you want to adapt the template rename the @file{ext.conf.in} to match your
571services name, you have to modify the @code{AC\_OUTPUT} section in @file{configure.ac} 586services name, you have to modify the @code{AC\_OUTPUT} section in @file{configure.ac}
572in the @file{gnunet-ext} root. 587in the @file{gnunet-ext} root.
573 588
589@node Writing a Client Application
574@section Writing a Client Application 590@section Writing a Client Application
575 591
576When writing any client application (for example, a command-line 592When writing any client application (for example, a command-line
@@ -583,6 +599,7 @@ used, which is typically not needed):
583@verbatiminclude tutorial-examples/001.c 599@verbatiminclude tutorial-examples/001.c
584@end example 600@end example
585 601
602@node Handling command-line options
586@subsection Handling command-line options 603@subsection Handling command-line options
587 604
588Options can then be added easily by adding global variables and 605Options can then be added easily by adding global variables and
@@ -612,6 +629,7 @@ more persistent P2P functions.
612Exercise: Add a few command-line options and print them inside 629Exercise: Add a few command-line options and print them inside
613of @code{run}. What happens if the user gives invalid arguments? 630of @code{run}. What happens if the user gives invalid arguments?
614 631
632@node Writing a Client Library
615@subsection Writing a Client Library 633@subsection Writing a Client Library
616 634
617The first and most important step in writing a client library is to 635The first and most important step in writing a client library is to
@@ -633,6 +651,7 @@ Unique message types must be defined for each message struct in the
633@file{gnunet\_protocols.h} header (or an extension-specific include 651@file{gnunet\_protocols.h} header (or an extension-specific include
634file). 652file).
635 653
654@node Connecting to the Service
636@subsubsection Connecting to the Service 655@subsubsection Connecting to the Service
637 656
638Before a client library can implement the application-specific protocol 657Before a client library can implement the application-specific protocol
@@ -650,6 +669,7 @@ receive from the service, and which functions handle them.
650The @code{error\_cb} is a function that is to be called whenever 669The @code{error\_cb} is a function that is to be called whenever
651there are errors communicating with the service. 670there are errors communicating with the service.
652 671
672@node Sending messages
653@subsubsection Sending messages 673@subsubsection Sending messages
654 674
655In GNUnet, messages are always sent beginning with a @code{struct GNUNET\_MessageHeader} 675In GNUnet, messages are always sent beginning with a @code{struct GNUNET\_MessageHeader}
@@ -678,7 +698,7 @@ Exercise: Define a helper function to transmit a 32-bit
678unsigned integer (as payload) to a service using some given client 698unsigned integer (as payload) to a service using some given client
679handle. 699handle.
680 700
681 701@node Receiving Replies from the Service
682@subsubsection Receiving Replies from the Service 702@subsubsection Receiving Replies from the Service
683 703
684Clients can receive messages from the service using the handlers 704Clients can receive messages from the service using the handlers
@@ -702,7 +722,7 @@ should call a callback provided to your helper function's API.
702 722
703Exercise: Figure out where you can pass values to the closures (@code{cls}). 723Exercise: Figure out where you can pass values to the closures (@code{cls}).
704 724
705 725@node Writing a user interface
706@subsection Writing a user interface 726@subsection Writing a user interface
707 727
708Given a client library, all it takes to access a service now is to 728Given a client library, all it takes to access a service now is to
@@ -714,11 +734,13 @@ client application to send a request to the service. For example,
714send a 32-bit integer value based on a number given at the 734send a 32-bit integer value based on a number given at the
715command-line to the service. 735command-line to the service.
716 736
737@node Writing a Service
717@section Writing a Service 738@section Writing a Service
718 739
719Before you can test the client you've written so far, you'll need to also 740Before you can test the client you've written so far, you'll need to also
720implement the corresponding service. 741implement the corresponding service.
721 742
743@node Code Placement
722@subsection Code Placement 744@subsection Code Placement
723 745
724New services are placed in their own subdirectory under @file{gnunet/src}. 746New services are placed in their own subdirectory under @file{gnunet/src}.
@@ -728,6 +750,7 @@ the description of the client-service protocol @file{SERVICE.h} and P2P protocol
728@file{gnunet-service-SERVICE.h} and several files for tests, including test code 750@file{gnunet-service-SERVICE.h} and several files for tests, including test code
729and configuration files. 751and configuration files.
730 752
753@node Starting a Service
731@subsection Starting a Service 754@subsection Starting a Service
732 755
733The key API definition for creating a service is the @code{GNUNET\_SERVICE\_MAIN} macro: 756The key API definition for creating a service is the @code{GNUNET\_SERVICE\_MAIN} macro:
@@ -767,7 +790,7 @@ Exercise: Change the service to ``handle'' the message from your
767client (for now, by printing a message). What happens if you 790client (for now, by printing a message). What happens if you
768forget to call @code{GNUNET\_SERVICE\_client\_continue()}? 791forget to call @code{GNUNET\_SERVICE\_client\_continue()}?
769 792
770 793@node Interacting directly with other Peers using the CORE Service
771@section Interacting directly with other Peers using the CORE Service 794@section Interacting directly with other Peers using the CORE Service
772 795
773FIXME: This section still needs to be updated to the lastest API! 796FIXME: This section still needs to be updated to the lastest API!
@@ -781,6 +804,7 @@ is connect to the @code{CORE} service using:
781@verbatiminclude tutorial-examples/009.c 804@verbatiminclude tutorial-examples/009.c
782@end example 805@end example
783 806
807@node New P2P connections
784@subsection New P2P connections 808@subsection New P2P connections
785 809
786Before any traffic with a different peer can be exchanged, the peer must be 810Before any traffic with a different peer can be exchanged, the peer must be
@@ -798,6 +822,7 @@ Exercise: Create a service that connects to the @code{CORE}. Then
798start (and connect) two peers and print a message once your connect 822start (and connect) two peers and print a message once your connect
799callback is invoked. 823callback is invoked.
800 824
825@node Receiving P2P Messages
801@subsection Receiving P2P Messages 826@subsection Receiving P2P Messages
802 827
803To receive messages from @code{CORE}, you pass the desired 828To receive messages from @code{CORE}, you pass the desired
@@ -814,7 +839,7 @@ handler and start a second peer that only has your ``old'' service
814without message handlers. Which ``connect'' handlers are invoked when 839without message handlers. Which ``connect'' handlers are invoked when
815the two peers are connected? Why? 840the two peers are connected? Why?
816 841
817 842@node Sending P2P Messages
818@subsection Sending P2P Messages 843@subsection Sending P2P Messages
819 844
820You can transmit messages to other peers using the @i{mq} you were 845You can transmit messages to other peers using the @i{mq} you were
@@ -832,7 +857,7 @@ transmission? Count using the STATISTICS service on both ends. Are
832messages lost? How can you transmit messages faster? What happens if 857messages lost? How can you transmit messages faster? What happens if
833you stop the peer that is receiving your messages? 858you stop the peer that is receiving your messages?
834 859
835 860@node End of P2P connections
836@subsection End of P2P connections 861@subsection End of P2P connections
837 862
838If a message handler returns @code{GNUNET\_SYSERR}, the remote peer shuts down or 863If a message handler returns @code{GNUNET\_SYSERR}, the remote peer shuts down or
@@ -846,6 +871,7 @@ The disconnect callback looks like the following:
846 871
847Exercise: Fix your service to handle peer disconnects. 872Exercise: Fix your service to handle peer disconnects.
848 873
874@node Storing peer-specific data using the PEERSTORE service
849@section Storing peer-specific data using the PEERSTORE service 875@section Storing peer-specific data using the PEERSTORE service
850 876
851GNUnet's PEERSTORE service offers a persistorage for arbitrary peer-specific data. 877GNUnet's PEERSTORE service offers a persistorage for arbitrary peer-specific data.
@@ -868,6 +894,7 @@ The first step is to start a connection to the PEERSTORE service:
868The service handle @code{peerstore_handle} will be needed for all subsequent 894The service handle @code{peerstore_handle} will be needed for all subsequent
869PEERSTORE operations. 895PEERSTORE operations.
870 896
897@node Storing records
871@subsection Storing records 898@subsection Storing records
872 899
873To store a new record, use the following function: 900To store a new record, use the following function:
@@ -891,6 +918,7 @@ void
891GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc); 918GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext *sc);
892@end example 919@end example
893 920
921@node Retrieving records
894@subsection Retrieving records 922@subsection Retrieving records
895 923
896To retrieve stored records, use the following function: 924To retrieve stored records, use the following function:
@@ -914,6 +942,7 @@ The @code{GNUNET_PEERSTORE_iterate} function returns a handle to the iterate ope
914handle can be used to cancel the iterate operation only before the callback function is called with 942handle can be used to cancel the iterate operation only before the callback function is called with
915a @code{NULL} record. 943a @code{NULL} record.
916 944
945@node Monitoring records
917@subsection Monitoring records 946@subsection Monitoring records
918 947
919PEERSTORE offers the functionality of monitoring for new records stored under a specific key 948PEERSTORE offers the functionality of monitoring for new records stored under a specific key
@@ -929,6 +958,7 @@ is broken or the watch operation is canceled:
929@verbatiminclude tutorial-examples/016.c 958@verbatiminclude tutorial-examples/016.c
930@end example 959@end example
931 960
961@node Disconnecting from PEERSTORE
932@subsection Disconnecting from PEERSTORE 962@subsection Disconnecting from PEERSTORE
933 963
934When the connection to the PEERSTORE service is no longer needed, disconnect using the following 964When the connection to the PEERSTORE service is no longer needed, disconnect using the following
@@ -941,7 +971,7 @@ If the @code{sync_first} flag is set to @code{GNUNET_YES}, the API will delay th
941disconnection until all store requests are received by the PEERSTORE service. Otherwise, 971disconnection until all store requests are received by the PEERSTORE service. Otherwise,
942it will disconnect immediately. 972it will disconnect immediately.
943 973
944 974@node Using the DHT
945@section Using the DHT 975@section Using the DHT
946 976
947The DHT allows to store data so other peers in the P2P network can 977The DHT allows to store data so other peers in the P2P network can
@@ -956,6 +986,7 @@ The second parameter indicates how many requests in parallel to expect.
956It is not a hard limit, but a good approximation will make the DHT more 986It is not a hard limit, but a good approximation will make the DHT more
957efficient. 987efficient.
958 988
989@node Storing data in the DHT
959@subsection Storing data in the DHT 990@subsection Storing data in the DHT
960Since the DHT is a dynamic environment (peers join and leave frequently) 991Since the DHT is a dynamic environment (peers join and leave frequently)
961the data that we put in the DHT does not stay there indefinitely. It is 992the data that we put in the DHT does not stay there indefinitely. It is
@@ -978,7 +1009,7 @@ Exercise: Store a value in the DHT periodically to make sure it is available
978over time. You might consider using the function @code{GNUNET\_SCHEDULER\_add\_delayed} 1009over time. You might consider using the function @code{GNUNET\_SCHEDULER\_add\_delayed}
979and call @code{GNUNET\_DHT\_put} from inside a helper function. 1010and call @code{GNUNET\_DHT\_put} from inside a helper function.
980 1011
981 1012@node Obtaining data from the DHT
982@subsection Obtaining data from the DHT 1013@subsection Obtaining data from the DHT
983As we saw in the previous example, the DHT works in an asynchronous mode. 1014As we saw in the previous example, the DHT works in an asynchronous mode.
984Each request to the DHT is executed ``in the background'' and the API 1015Each request to the DHT is executed ``in the background'' and the API
@@ -1000,6 +1031,7 @@ Exercise: Store a value in the DHT and after a while retrieve it. Show the IDs o
1000the peers the requests have gone through. In order to convert a peer ID to a string, use 1031the peers the requests have gone through. In order to convert a peer ID to a string, use
1001the function @code{GNUNET\_i2s}. Pay attention to the route option parameters in both calls! 1032the function @code{GNUNET\_i2s}. Pay attention to the route option parameters in both calls!
1002 1033
1034@node Implementing a block plugin
1003@subsection Implementing a block plugin 1035@subsection Implementing a block plugin
1004 1036
1005In order to store data in the DHT, it is necessary to provide a block 1037In order to store data in the DHT, it is necessary to provide a block
@@ -1011,6 +1043,7 @@ in the service's respective directory. The
1011mandatory functions that need to be implemented for a block plugin are 1043mandatory functions that need to be implemented for a block plugin are
1012described in the following sections. 1044described in the following sections.
1013 1045
1046@node Validating requests and replies
1014@subsubsection Validating requests and replies 1047@subsubsection Validating requests and replies
1015 1048
1016The evaluate function should validate a reply or a request. It returns 1049The evaluate function should validate a reply or a request. It returns
@@ -1033,6 +1066,7 @@ typically done using the Bloom filter block group provided by
1033@file{libgnunetblockgroup.so}. Failure to do so may cause replies to 1066@file{libgnunetblockgroup.so}. Failure to do so may cause replies to
1034circle in the network. 1067circle in the network.
1035 1068
1069@node Deriving a key from a reply
1036@subsubsection Deriving a key from a reply 1070@subsubsection Deriving a key from a reply
1037 1071
1038The DHT can operate more efficiently if it is possible to derive a key 1072The DHT can operate more efficiently if it is possible to derive a key
@@ -1045,6 +1079,7 @@ just fine with such blocks).
1045@verbatiminclude tutorial-examples/022.c 1079@verbatiminclude tutorial-examples/022.c
1046@end example 1080@end example
1047 1081
1082@node Initialization of the plugin
1048@subsubsection Initialization of the plugin 1083@subsubsection Initialization of the plugin
1049 1084
1050The plugin is realized as a shared C library. The library must export 1085The plugin is realized as a shared C library. The library must export
@@ -1056,6 +1091,7 @@ validation and obtaining keys (the ones just defined above).
1056@verbatiminclude tutorial-examples/023.c 1091@verbatiminclude tutorial-examples/023.c
1057@end example 1092@end example
1058 1093
1094@node Shutdown of the plugin
1059@subsubsection Shutdown of the plugin 1095@subsubsection Shutdown of the plugin
1060 1096
1061Following GNUnet's general plugin API concept, the plugin must 1097Following GNUnet's general plugin API concept, the plugin must
@@ -1065,6 +1101,7 @@ little.
1065@verbatiminclude tutorial-examples/024.c 1101@verbatiminclude tutorial-examples/024.c
1066@end example 1102@end example
1067 1103
1104@node Integration of the plugin with the build system
1068@subsubsection Integration of the plugin with the build system 1105@subsubsection Integration of the plugin with the build system
1069 1106
1070In order to compile the plugin, the @file{Makefile.am} file for the 1107In order to compile the plugin, the @file{Makefile.am} file for the
@@ -1079,6 +1116,7 @@ Exercise: Write a block plugin that accepts all queries
1079and all replies but prints information about queries and replies 1116and all replies but prints information about queries and replies
1080when the respective validation hooks are called. 1117when the respective validation hooks are called.
1081 1118
1119@node Monitoring the DHT
1082@subsection Monitoring the DHT 1120@subsection Monitoring the DHT
1083It is possible to monitor the functioning of the local DHT service. When monitoring 1121It is possible to monitor the functioning of the local DHT service. When monitoring
1084the DHT, the service will alert the monitoring program of any events, 1122the DHT, the service will alert the monitoring program of any events,
@@ -1094,6 +1132,7 @@ is called with all the information about the event.
1094@verbatiminclude tutorial-examples/026.c 1132@verbatiminclude tutorial-examples/026.c
1095@end example 1133@end example
1096 1134
1135@node Debugging with gnunet-arm
1097@section Debugging with gnunet-arm 1136@section Debugging with gnunet-arm
1098 1137
1099Even if services are managed by @command{gnunet-arm}, you can start them with 1138Even if services are managed by @command{gnunet-arm}, you can start them with