diff options
Diffstat (limited to 'doc/old/tutorial')
40 files changed, 5144 insertions, 0 deletions
diff --git a/doc/old/tutorial/.gitignore b/doc/old/tutorial/.gitignore new file mode 100644 index 000000000..11bb2078e --- /dev/null +++ b/doc/old/tutorial/.gitignore | |||
@@ -0,0 +1,11 @@ | |||
1 | stamp-1 | ||
2 | version2.texi | ||
3 | tutorial | ||
4 | *.fn | ||
5 | *.fns | ||
6 | *.ky | ||
7 | *.pg | ||
8 | *.tp | ||
9 | *.vr | ||
10 | tutorial | ||
11 | tutorial.html | ||
diff --git a/doc/old/tutorial/Makefile.am b/doc/old/tutorial/Makefile.am new file mode 100644 index 000000000..afe4aa6c0 --- /dev/null +++ b/doc/old/tutorial/Makefile.am | |||
@@ -0,0 +1,79 @@ | |||
1 | # This Makefile.am is in the public domain | ||
2 | docdir = $(datadir)/doc/gnunet/ | ||
3 | |||
4 | AM_MAKEINFOHTMLFLAGS = $(TEXINFO_HTMLFLAGS) | ||
5 | |||
6 | |||
7 | gnunet_tutorial_examples = \ | ||
8 | examples/001.c \ | ||
9 | examples/002.c \ | ||
10 | examples/003.c \ | ||
11 | examples/004.c \ | ||
12 | examples/005.c \ | ||
13 | examples/006.c \ | ||
14 | examples/007.c \ | ||
15 | examples/008.c \ | ||
16 | examples/009.c \ | ||
17 | examples/010.c \ | ||
18 | examples/011.c \ | ||
19 | examples/012.c \ | ||
20 | examples/013.c \ | ||
21 | examples/013.1.c \ | ||
22 | examples/014.c \ | ||
23 | examples/015.c \ | ||
24 | examples/016.c \ | ||
25 | examples/017.c \ | ||
26 | examples/018.c \ | ||
27 | examples/019.c \ | ||
28 | examples/020.c \ | ||
29 | examples/021.c \ | ||
30 | examples/022.c \ | ||
31 | examples/023.c \ | ||
32 | examples/024.c \ | ||
33 | examples/025.Makefile.am \ | ||
34 | examples/026.c \ | ||
35 | examples/testbed_test.c | ||
36 | |||
37 | info_TEXINFOS = tutorial.texi | ||
38 | |||
39 | tutorial_TEXINFOS = \ | ||
40 | fdl-1.3.texi \ | ||
41 | gpl-3.0.texi \ | ||
42 | agpl-3.0.texi \ | ||
43 | version.texi | ||
44 | |||
45 | EXTRA_DIST = \ | ||
46 | $(tutorial_TEXINFOS) \ | ||
47 | $(gnunet_tutorial_examples) \ | ||
48 | htmlxref.cnf \ | ||
49 | run-gendocs.sh \ | ||
50 | docstyle.css \ | ||
51 | manual.css \ | ||
52 | reset.css \ | ||
53 | style.css | ||
54 | |||
55 | |||
56 | DISTCLEANFILES = \ | ||
57 | tutorial.cps \ | ||
58 | fdl-1.3.cps \ | ||
59 | agpl-3.0.cps \ | ||
60 | gpl-3.0.cps | ||
61 | |||
62 | |||
63 | CLEANFILES= \ | ||
64 | stamp-vti \ | ||
65 | version.texi \ | ||
66 | tutorial.t2p \ | ||
67 | $(DISTCLEANFILES) | ||
68 | |||
69 | doc-all-install: | ||
70 | @mkdir -p $(DESTDIR)/$(docdir) | ||
71 | @mkdir -p $(DESTDIR)/$(infoimagedir) | ||
72 | @mkdir -p $(DESTDIR)/$(infodir) | ||
73 | @install -m 0755 gnunet-tutorial.pdf $(DESTDIR)/$(docdir) | ||
74 | @install -m 0755 gnunet-tutorial.info $(DESTDIR)/$(infodir) | ||
75 | @install gnunet-tutorial.html $(DESTDIR)/$(docdir) | ||
76 | |||
77 | doc-gendoc-install: | ||
78 | @mkdir -p $(DESTDIR)/$(docdir) | ||
79 | @cp -r manual $(DESTDIR)/$(docdir) | ||
diff --git a/doc/old/tutorial/agpl-3.0.texi b/doc/old/tutorial/agpl-3.0.texi new file mode 100644 index 000000000..eabb0c6df --- /dev/null +++ b/doc/old/tutorial/agpl-3.0.texi | |||
@@ -0,0 +1,698 @@ | |||
1 | @c The GNU Affero General Public License. | ||
2 | @center Version 3, 19 November 2007 | ||
3 | |||
4 | @c This file is intended to be included within another document, | ||
5 | @c hence no sectioning command or @node. | ||
6 | |||
7 | @display | ||
8 | Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{https://fsf.org/} | ||
9 | |||
10 | Everyone is permitted to copy and distribute verbatim copies of this | ||
11 | license document, but changing it is not allowed. | ||
12 | @end display | ||
13 | |||
14 | @heading Preamble | ||
15 | |||
16 | The GNU Affero General Public License is a free, copyleft license | ||
17 | for software and other kinds of works, specifically designed to ensure | ||
18 | cooperation with the community in the case of network server software. | ||
19 | |||
20 | The licenses for most software and other practical works are | ||
21 | designed to take away your freedom to share and change the works. By | ||
22 | contrast, our General Public Licenses are intended to guarantee your | ||
23 | freedom to share and change all versions of a program--to make sure it | ||
24 | remains free software for all its users. | ||
25 | |||
26 | When we speak of free software, we are referring to freedom, not | ||
27 | price. Our General Public Licenses are designed to make sure that you | ||
28 | have the freedom to distribute copies of free software (and charge for | ||
29 | them if you wish), that you receive source code or can get it if you | ||
30 | want it, that you can change the software or use pieces of it in new | ||
31 | free programs, and that you know you can do these things. | ||
32 | |||
33 | Developers that use our General Public Licenses protect your rights | ||
34 | with two steps: (1) assert copyright on the software, and (2) offer | ||
35 | you this License which gives you legal permission to copy, distribute | ||
36 | and/or modify the software. | ||
37 | |||
38 | A secondary benefit of defending all users' freedom is that | ||
39 | improvements made in alternate versions of the program, if they | ||
40 | receive widespread use, become available for other developers to | ||
41 | incorporate. Many developers of free software are heartened and | ||
42 | encouraged by the resulting cooperation. However, in the case of | ||
43 | software used on network servers, this result may fail to come about. | ||
44 | The GNU General Public License permits making a modified version and | ||
45 | letting the public access it on a server without ever releasing its | ||
46 | source code to the public. | ||
47 | |||
48 | The GNU Affero General Public License is designed specifically to | ||
49 | ensure that, in such cases, the modified source code becomes available | ||
50 | to the community. It requires the operator of a network server to | ||
51 | provide the source code of the modified version running there to the | ||
52 | users of that server. Therefore, public use of a modified version, on | ||
53 | a publicly accessible server, gives the public access to the source | ||
54 | code of the modified version. | ||
55 | |||
56 | An older license, called the Affero General Public License and | ||
57 | published by Affero, was designed to accomplish similar goals. This is | ||
58 | a different license, not a version of the Affero GPL, but Affero has | ||
59 | released a new version of the Affero GPL which permits relicensing under | ||
60 | this license. | ||
61 | |||
62 | The precise terms and conditions for copying, distribution and | ||
63 | modification follow. | ||
64 | |||
65 | @heading TERMS AND CONDITIONS | ||
66 | |||
67 | @enumerate 0 | ||
68 | @item Definitions. | ||
69 | |||
70 | ``This License'' refers to version 3 of the GNU Affero General Public License. | ||
71 | |||
72 | ``Copyright'' also means copyright-like laws that apply to other kinds | ||
73 | of works, such as semiconductor masks. | ||
74 | |||
75 | ``The Program'' refers to any copyrightable work licensed under this | ||
76 | License. Each licensee is addressed as ``you''. ``Licensees'' and | ||
77 | ``recipients'' may be individuals or organizations. | ||
78 | |||
79 | To ``modify'' a work means to copy from or adapt all or part of the work | ||
80 | in a fashion requiring copyright permission, other than the making of | ||
81 | an exact copy. The resulting work is called a ``modified version'' of | ||
82 | the earlier work or a work ``based on'' the earlier work. | ||
83 | |||
84 | A ``covered work'' means either the unmodified Program or a work based | ||
85 | on the Program. | ||
86 | |||
87 | To ``propagate'' a work means to do anything with it that, without | ||
88 | permission, would make you directly or secondarily liable for | ||
89 | infringement under applicable copyright law, except executing it on a | ||
90 | computer or modifying a private copy. Propagation includes copying, | ||
91 | distribution (with or without modification), making available to the | ||
92 | public, and in some countries other activities as well. | ||
93 | |||
94 | To ``convey'' a work means any kind of propagation that enables other | ||
95 | parties to make or receive copies. Mere interaction with a user | ||
96 | through a computer network, with no transfer of a copy, is not | ||
97 | conveying. | ||
98 | |||
99 | An interactive user interface displays ``Appropriate Legal Notices'' to | ||
100 | the extent that it includes a convenient and prominently visible | ||
101 | feature that (1) displays an appropriate copyright notice, and (2) | ||
102 | tells the user that there is no warranty for the work (except to the | ||
103 | extent that warranties are provided), that licensees may convey the | ||
104 | work under this License, and how to view a copy of this License. If | ||
105 | the interface presents a list of user commands or options, such as a | ||
106 | menu, a prominent item in the list meets this criterion. | ||
107 | |||
108 | @item Source Code. | ||
109 | |||
110 | The ``source code'' for a work means the preferred form of the work for | ||
111 | making modifications to it. ``Object code'' means any non-source form | ||
112 | of a work. | ||
113 | |||
114 | A ``Standard Interface'' means an interface that either is an official | ||
115 | standard defined by a recognized standards body, or, in the case of | ||
116 | interfaces specified for a particular programming language, one that | ||
117 | is widely used among developers working in that language. | ||
118 | |||
119 | The ``System Libraries'' of an executable work include anything, other | ||
120 | than the work as a whole, that (a) is included in the normal form of | ||
121 | packaging a Major Component, but which is not part of that Major | ||
122 | Component, and (b) serves only to enable use of the work with that | ||
123 | Major Component, or to implement a Standard Interface for which an | ||
124 | implementation is available to the public in source code form. A | ||
125 | ``Major Component'', in this context, means a major essential component | ||
126 | (kernel, window system, and so on) of the specific operating system | ||
127 | (if any) on which the executable work runs, or a compiler used to | ||
128 | produce the work, or an object code interpreter used to run it. | ||
129 | |||
130 | The ``Corresponding Source'' for a work in object code form means all | ||
131 | the source code needed to generate, install, and (for an executable | ||
132 | work) run the object code and to modify the work, including scripts to | ||
133 | control those activities. However, it does not include the work's | ||
134 | System Libraries, or general-purpose tools or generally available free | ||
135 | programs which are used unmodified in performing those activities but | ||
136 | which are not part of the work. For example, Corresponding Source | ||
137 | includes interface definition files associated with source files for | ||
138 | the work, and the source code for shared libraries and dynamically | ||
139 | linked subprograms that the work is specifically designed to require, | ||
140 | such as by intimate data communication or control flow between those | ||
141 | subprograms and other parts of the work. | ||
142 | |||
143 | The Corresponding Source need not include anything that users can | ||
144 | regenerate automatically from other parts of the Corresponding Source. | ||
145 | |||
146 | The Corresponding Source for a work in source code form is that same | ||
147 | work. | ||
148 | |||
149 | @item Basic Permissions. | ||
150 | |||
151 | All rights granted under this License are granted for the term of | ||
152 | copyright on the Program, and are irrevocable provided the stated | ||
153 | conditions are met. This License explicitly affirms your unlimited | ||
154 | permission to run the unmodified Program. The output from running a | ||
155 | covered work is covered by this License only if the output, given its | ||
156 | content, constitutes a covered work. This License acknowledges your | ||
157 | rights of fair use or other equivalent, as provided by copyright law. | ||
158 | |||
159 | You may make, run and propagate covered works that you do not convey, | ||
160 | without conditions so long as your license otherwise remains in force. | ||
161 | You may convey covered works to others for the sole purpose of having | ||
162 | them make modifications exclusively for you, or provide you with | ||
163 | facilities for running those works, provided that you comply with the | ||
164 | terms of this License in conveying all material for which you do not | ||
165 | control copyright. Those thus making or running the covered works for | ||
166 | you must do so exclusively on your behalf, under your direction and | ||
167 | control, on terms that prohibit them from making any copies of your | ||
168 | copyrighted material outside their relationship with you. | ||
169 | |||
170 | Conveying under any other circumstances is permitted solely under the | ||
171 | conditions stated below. Sublicensing is not allowed; section 10 | ||
172 | makes it unnecessary. | ||
173 | |||
174 | @item Protecting Users' Legal Rights From Anti-Circumvention Law. | ||
175 | |||
176 | No covered work shall be deemed part of an effective technological | ||
177 | measure under any applicable law fulfilling obligations under article | ||
178 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or | ||
179 | similar laws prohibiting or restricting circumvention of such | ||
180 | measures. | ||
181 | |||
182 | When you convey a covered work, you waive any legal power to forbid | ||
183 | circumvention of technological measures to the extent such | ||
184 | circumvention is effected by exercising rights under this License with | ||
185 | respect to the covered work, and you disclaim any intention to limit | ||
186 | operation or modification of the work as a means of enforcing, against | ||
187 | the work's users, your or third parties' legal rights to forbid | ||
188 | circumvention of technological measures. | ||
189 | |||
190 | @item Conveying Verbatim Copies. | ||
191 | |||
192 | You may convey verbatim copies of the Program's source code as you | ||
193 | receive it, in any medium, provided that you conspicuously and | ||
194 | appropriately publish on each copy an appropriate copyright notice; | ||
195 | keep intact all notices stating that this License and any | ||
196 | non-permissive terms added in accord with section 7 apply to the code; | ||
197 | keep intact all notices of the absence of any warranty; and give all | ||
198 | recipients a copy of this License along with the Program. | ||
199 | |||
200 | You may charge any price or no price for each copy that you convey, | ||
201 | and you may offer support or warranty protection for a fee. | ||
202 | |||
203 | @item Conveying Modified Source Versions. | ||
204 | |||
205 | You may convey a work based on the Program, or the modifications to | ||
206 | produce it from the Program, in the form of source code under the | ||
207 | terms of section 4, provided that you also meet all of these | ||
208 | conditions: | ||
209 | |||
210 | @enumerate a | ||
211 | @item | ||
212 | The work must carry prominent notices stating that you modified it, | ||
213 | and giving a relevant date. | ||
214 | |||
215 | @item | ||
216 | The work must carry prominent notices stating that it is released | ||
217 | under this License and any conditions added under section 7. This | ||
218 | requirement modifies the requirement in section 4 to ``keep intact all | ||
219 | notices''. | ||
220 | |||
221 | @item | ||
222 | You must license the entire work, as a whole, under this License to | ||
223 | anyone who comes into possession of a copy. This License will | ||
224 | therefore apply, along with any applicable section 7 additional terms, | ||
225 | to the whole of the work, and all its parts, regardless of how they | ||
226 | are packaged. This License gives no permission to license the work in | ||
227 | any other way, but it does not invalidate such permission if you have | ||
228 | separately received it. | ||
229 | |||
230 | @item | ||
231 | If the work has interactive user interfaces, each must display | ||
232 | Appropriate Legal Notices; however, if the Program has interactive | ||
233 | interfaces that do not display Appropriate Legal Notices, your work | ||
234 | need not make them do so. | ||
235 | @end enumerate | ||
236 | |||
237 | A compilation of a covered work with other separate and independent | ||
238 | works, which are not by their nature extensions of the covered work, | ||
239 | and which are not combined with it such as to form a larger program, | ||
240 | in or on a volume of a storage or distribution medium, is called an | ||
241 | ``aggregate'' if the compilation and its resulting copyright are not | ||
242 | used to limit the access or legal rights of the compilation's users | ||
243 | beyond what the individual works permit. Inclusion of a covered work | ||
244 | in an aggregate does not cause this License to apply to the other | ||
245 | parts of the aggregate. | ||
246 | |||
247 | @item Conveying Non-Source Forms. | ||
248 | |||
249 | You may convey a covered work in object code form under the terms of | ||
250 | sections 4 and 5, provided that you also convey the machine-readable | ||
251 | Corresponding Source under the terms of this License, in one of these | ||
252 | ways: | ||
253 | |||
254 | @enumerate a | ||
255 | @item | ||
256 | Convey the object code in, or embodied in, a physical product | ||
257 | (including a physical distribution medium), accompanied by the | ||
258 | Corresponding Source fixed on a durable physical medium customarily | ||
259 | used for software interchange. | ||
260 | |||
261 | @item | ||
262 | Convey the object code in, or embodied in, a physical product | ||
263 | (including a physical distribution medium), accompanied by a written | ||
264 | offer, valid for at least three years and valid for as long as you | ||
265 | offer spare parts or customer support for that product model, to give | ||
266 | anyone who possesses the object code either (1) a copy of the | ||
267 | Corresponding Source for all the software in the product that is | ||
268 | covered by this License, on a durable physical medium customarily used | ||
269 | for software interchange, for a price no more than your reasonable | ||
270 | cost of physically performing this conveying of source, or (2) access | ||
271 | to copy the Corresponding Source from a network server at no charge. | ||
272 | |||
273 | @item | ||
274 | Convey individual copies of the object code with a copy of the written | ||
275 | offer to provide the Corresponding Source. This alternative is | ||
276 | allowed only occasionally and noncommercially, and only if you | ||
277 | received the object code with such an offer, in accord with subsection | ||
278 | 6b. | ||
279 | |||
280 | @item | ||
281 | Convey the object code by offering access from a designated place | ||
282 | (gratis or for a charge), and offer equivalent access to the | ||
283 | Corresponding Source in the same way through the same place at no | ||
284 | further charge. You need not require recipients to copy the | ||
285 | Corresponding Source along with the object code. If the place to copy | ||
286 | the object code is a network server, the Corresponding Source may be | ||
287 | on a different server (operated by you or a third party) that supports | ||
288 | equivalent copying facilities, provided you maintain clear directions | ||
289 | next to the object code saying where to find the Corresponding Source. | ||
290 | Regardless of what server hosts the Corresponding Source, you remain | ||
291 | obligated to ensure that it is available for as long as needed to | ||
292 | satisfy these requirements. | ||
293 | |||
294 | @item | ||
295 | Convey the object code using peer-to-peer transmission, provided you | ||
296 | inform other peers where the object code and Corresponding Source of | ||
297 | the work are being offered to the general public at no charge under | ||
298 | subsection 6d. | ||
299 | |||
300 | @end enumerate | ||
301 | |||
302 | A separable portion of the object code, whose source code is excluded | ||
303 | from the Corresponding Source as a System Library, need not be | ||
304 | included in conveying the object code work. | ||
305 | |||
306 | A ``User Product'' is either (1) a ``consumer product'', which means any | ||
307 | tangible personal property which is normally used for personal, | ||
308 | family, or household purposes, or (2) anything designed or sold for | ||
309 | incorporation into a dwelling. In determining whether a product is a | ||
310 | consumer product, doubtful cases shall be resolved in favor of | ||
311 | coverage. For a particular product received by a particular user, | ||
312 | ``normally used'' refers to a typical or common use of that class of | ||
313 | product, regardless of the status of the particular user or of the way | ||
314 | in which the particular user actually uses, or expects or is expected | ||
315 | to use, the product. A product is a consumer product regardless of | ||
316 | whether the product has substantial commercial, industrial or | ||
317 | non-consumer uses, unless such uses represent the only significant | ||
318 | mode of use of the product. | ||
319 | |||
320 | ``Installation Information'' for a User Product means any methods, | ||
321 | procedures, authorization keys, or other information required to | ||
322 | install and execute modified versions of a covered work in that User | ||
323 | Product from a modified version of its Corresponding Source. The | ||
324 | information must suffice to ensure that the continued functioning of | ||
325 | the modified object code is in no case prevented or interfered with | ||
326 | solely because modification has been made. | ||
327 | |||
328 | If you convey an object code work under this section in, or with, or | ||
329 | specifically for use in, a User Product, and the conveying occurs as | ||
330 | part of a transaction in which the right of possession and use of the | ||
331 | User Product is transferred to the recipient in perpetuity or for a | ||
332 | fixed term (regardless of how the transaction is characterized), the | ||
333 | Corresponding Source conveyed under this section must be accompanied | ||
334 | by the Installation Information. But this requirement does not apply | ||
335 | if neither you nor any third party retains the ability to install | ||
336 | modified object code on the User Product (for example, the work has | ||
337 | been installed in ROM). | ||
338 | |||
339 | The requirement to provide Installation Information does not include a | ||
340 | requirement to continue to provide support service, warranty, or | ||
341 | updates for a work that has been modified or installed by the | ||
342 | recipient, or for the User Product in which it has been modified or | ||
343 | installed. Access to a network may be denied when the modification | ||
344 | itself materially and adversely affects the operation of the network | ||
345 | or violates the rules and protocols for communication across the | ||
346 | network. | ||
347 | |||
348 | Corresponding Source conveyed, and Installation Information provided, | ||
349 | in accord with this section must be in a format that is publicly | ||
350 | documented (and with an implementation available to the public in | ||
351 | source code form), and must require no special password or key for | ||
352 | unpacking, reading or copying. | ||
353 | |||
354 | @item Additional Terms. | ||
355 | |||
356 | ``Additional permissions'' are terms that supplement the terms of this | ||
357 | License by making exceptions from one or more of its conditions. | ||
358 | Additional permissions that are applicable to the entire Program shall | ||
359 | be treated as though they were included in this License, to the extent | ||
360 | that they are valid under applicable law. If additional permissions | ||
361 | apply only to part of the Program, that part may be used separately | ||
362 | under those permissions, but the entire Program remains governed by | ||
363 | this License without regard to the additional permissions. | ||
364 | |||
365 | When you convey a copy of a covered work, you may at your option | ||
366 | remove any additional permissions from that copy, or from any part of | ||
367 | it. (Additional permissions may be written to require their own | ||
368 | removal in certain cases when you modify the work.) You may place | ||
369 | additional permissions on material, added by you to a covered work, | ||
370 | for which you have or can give appropriate copyright permission. | ||
371 | |||
372 | Notwithstanding any other provision of this License, for material you | ||
373 | add to a covered work, you may (if authorized by the copyright holders | ||
374 | of that material) supplement the terms of this License with terms: | ||
375 | |||
376 | @enumerate a | ||
377 | @item | ||
378 | Disclaiming warranty or limiting liability differently from the terms | ||
379 | of sections 15 and 16 of this License; or | ||
380 | |||
381 | @item | ||
382 | Requiring preservation of specified reasonable legal notices or author | ||
383 | attributions in that material or in the Appropriate Legal Notices | ||
384 | displayed by works containing it; or | ||
385 | |||
386 | @item | ||
387 | Prohibiting misrepresentation of the origin of that material, or | ||
388 | requiring that modified versions of such material be marked in | ||
389 | reasonable ways as different from the original version; or | ||
390 | |||
391 | @item | ||
392 | Limiting the use for publicity purposes of names of licensors or | ||
393 | authors of the material; or | ||
394 | |||
395 | @item | ||
396 | Declining to grant rights under trademark law for use of some trade | ||
397 | names, trademarks, or service marks; or | ||
398 | |||
399 | @item | ||
400 | Requiring indemnification of licensors and authors of that material by | ||
401 | anyone who conveys the material (or modified versions of it) with | ||
402 | contractual assumptions of liability to the recipient, for any | ||
403 | liability that these contractual assumptions directly impose on those | ||
404 | licensors and authors. | ||
405 | @end enumerate | ||
406 | |||
407 | All other non-permissive additional terms are considered ``further | ||
408 | restrictions'' within the meaning of section 10. If the Program as you | ||
409 | received it, or any part of it, contains a notice stating that it is | ||
410 | governed by this License along with a term that is a further | ||
411 | restriction, you may remove that term. If a license document contains | ||
412 | a further restriction but permits relicensing or conveying under this | ||
413 | License, you may add to a covered work material governed by the terms | ||
414 | of that license document, provided that the further restriction does | ||
415 | not survive such relicensing or conveying. | ||
416 | |||
417 | If you add terms to a covered work in accord with this section, you | ||
418 | must place, in the relevant source files, a statement of the | ||
419 | additional terms that apply to those files, or a notice indicating | ||
420 | where to find the applicable terms. | ||
421 | |||
422 | Additional terms, permissive or non-permissive, may be stated in the | ||
423 | form of a separately written license, or stated as exceptions; the | ||
424 | above requirements apply either way. | ||
425 | |||
426 | @item Termination. | ||
427 | |||
428 | You may not propagate or modify a covered work except as expressly | ||
429 | provided under this License. Any attempt otherwise to propagate or | ||
430 | modify it is void, and will automatically terminate your rights under | ||
431 | this License (including any patent licenses granted under the third | ||
432 | paragraph of section 11). | ||
433 | |||
434 | However, if you cease all violation of this License, then your license | ||
435 | from a particular copyright holder is reinstated (a) provisionally, | ||
436 | unless and until the copyright holder explicitly and finally | ||
437 | terminates your license, and (b) permanently, if the copyright holder | ||
438 | fails to notify you of the violation by some reasonable means prior to | ||
439 | 60 days after the cessation. | ||
440 | |||
441 | Moreover, your license from a particular copyright holder is | ||
442 | reinstated permanently if the copyright holder notifies you of the | ||
443 | violation by some reasonable means, this is the first time you have | ||
444 | received notice of violation of this License (for any work) from that | ||
445 | copyright holder, and you cure the violation prior to 30 days after | ||
446 | your receipt of the notice. | ||
447 | |||
448 | Termination of your rights under this section does not terminate the | ||
449 | licenses of parties who have received copies or rights from you under | ||
450 | this License. If your rights have been terminated and not permanently | ||
451 | reinstated, you do not qualify to receive new licenses for the same | ||
452 | material under section 10. | ||
453 | |||
454 | @item Acceptance Not Required for Having Copies. | ||
455 | |||
456 | You are not required to accept this License in order to receive or run | ||
457 | a copy of the Program. Ancillary propagation of a covered work | ||
458 | occurring solely as a consequence of using peer-to-peer transmission | ||
459 | to receive a copy likewise does not require acceptance. However, | ||
460 | nothing other than this License grants you permission to propagate or | ||
461 | modify any covered work. These actions infringe copyright if you do | ||
462 | not accept this License. Therefore, by modifying or propagating a | ||
463 | covered work, you indicate your acceptance of this License to do so. | ||
464 | |||
465 | @item Automatic Licensing of Downstream Recipients. | ||
466 | |||
467 | Each time you convey a covered work, the recipient automatically | ||
468 | receives a license from the original licensors, to run, modify and | ||
469 | propagate that work, subject to this License. You are not responsible | ||
470 | for enforcing compliance by third parties with this License. | ||
471 | |||
472 | An ``entity transaction'' is a transaction transferring control of an | ||
473 | organization, or substantially all assets of one, or subdividing an | ||
474 | organization, or merging organizations. If propagation of a covered | ||
475 | work results from an entity transaction, each party to that | ||
476 | transaction who receives a copy of the work also receives whatever | ||
477 | licenses to the work the party's predecessor in interest had or could | ||
478 | give under the previous paragraph, plus a right to possession of the | ||
479 | Corresponding Source of the work from the predecessor in interest, if | ||
480 | the predecessor has it or can get it with reasonable efforts. | ||
481 | |||
482 | You may not impose any further restrictions on the exercise of the | ||
483 | rights granted or affirmed under this License. For example, you may | ||
484 | not impose a license fee, royalty, or other charge for exercise of | ||
485 | rights granted under this License, and you may not initiate litigation | ||
486 | (including a cross-claim or counterclaim in a lawsuit) alleging that | ||
487 | any patent claim is infringed by making, using, selling, offering for | ||
488 | sale, or importing the Program or any portion of it. | ||
489 | |||
490 | @item Patents. | ||
491 | |||
492 | A ``contributor'' is a copyright holder who authorizes use under this | ||
493 | License of the Program or a work on which the Program is based. The | ||
494 | work thus licensed is called the contributor's ``contributor version''. | ||
495 | |||
496 | A contributor's ``essential patent claims'' are all patent claims owned | ||
497 | or controlled by the contributor, whether already acquired or | ||
498 | hereafter acquired, that would be infringed by some manner, permitted | ||
499 | by this License, of making, using, or selling its contributor version, | ||
500 | but do not include claims that would be infringed only as a | ||
501 | consequence of further modification of the contributor version. For | ||
502 | purposes of this definition, ``control'' includes the right to grant | ||
503 | patent sublicenses in a manner consistent with the requirements of | ||
504 | this License. | ||
505 | |||
506 | Each contributor grants you a non-exclusive, worldwide, royalty-free | ||
507 | patent license under the contributor's essential patent claims, to | ||
508 | make, use, sell, offer for sale, import and otherwise run, modify and | ||
509 | propagate the contents of its contributor version. | ||
510 | |||
511 | In the following three paragraphs, a ``patent license'' is any express | ||
512 | agreement or commitment, however denominated, not to enforce a patent | ||
513 | (such as an express permission to practice a patent or covenant not to | ||
514 | sue for patent infringement). To ``grant'' such a patent license to a | ||
515 | party means to make such an agreement or commitment not to enforce a | ||
516 | patent against the party. | ||
517 | |||
518 | If you convey a covered work, knowingly relying on a patent license, | ||
519 | and the Corresponding Source of the work is not available for anyone | ||
520 | to copy, free of charge and under the terms of this License, through a | ||
521 | publicly available network server or other readily accessible means, | ||
522 | then you must either (1) cause the Corresponding Source to be so | ||
523 | available, or (2) arrange to deprive yourself of the benefit of the | ||
524 | patent license for this particular work, or (3) arrange, in a manner | ||
525 | consistent with the requirements of this License, to extend the patent | ||
526 | license to downstream recipients. ``Knowingly relying'' means you have | ||
527 | actual knowledge that, but for the patent license, your conveying the | ||
528 | covered work in a country, or your recipient's use of the covered work | ||
529 | in a country, would infringe one or more identifiable patents in that | ||
530 | country that you have reason to believe are valid. | ||
531 | |||
532 | If, pursuant to or in connection with a single transaction or | ||
533 | arrangement, you convey, or propagate by procuring conveyance of, a | ||
534 | covered work, and grant a patent license to some of the parties | ||
535 | receiving the covered work authorizing them to use, propagate, modify | ||
536 | or convey a specific copy of the covered work, then the patent license | ||
537 | you grant is automatically extended to all recipients of the covered | ||
538 | work and works based on it. | ||
539 | |||
540 | A patent license is ``discriminatory'' if it does not include within the | ||
541 | scope of its coverage, prohibits the exercise of, or is conditioned on | ||
542 | the non-exercise of one or more of the rights that are specifically | ||
543 | granted under this License. You may not convey a covered work if you | ||
544 | are a party to an arrangement with a third party that is in the | ||
545 | business of distributing software, under which you make payment to the | ||
546 | third party based on the extent of your activity of conveying the | ||
547 | work, and under which the third party grants, to any of the parties | ||
548 | who would receive the covered work from you, a discriminatory patent | ||
549 | license (a) in connection with copies of the covered work conveyed by | ||
550 | you (or copies made from those copies), or (b) primarily for and in | ||
551 | connection with specific products or compilations that contain the | ||
552 | covered work, unless you entered into that arrangement, or that patent | ||
553 | license was granted, prior to 28 March 2007. | ||
554 | |||
555 | Nothing in this License shall be construed as excluding or limiting | ||
556 | any implied license or other defenses to infringement that may | ||
557 | otherwise be available to you under applicable patent law. | ||
558 | |||
559 | @item No Surrender of Others' Freedom. | ||
560 | |||
561 | If conditions are imposed on you (whether by court order, agreement or | ||
562 | otherwise) that contradict the conditions of this License, they do not | ||
563 | excuse you from the conditions of this License. If you cannot convey | ||
564 | a covered work so as to satisfy simultaneously your obligations under | ||
565 | this License and any other pertinent obligations, then as a | ||
566 | consequence you may not convey it at all. For example, if you agree | ||
567 | to terms that obligate you to collect a royalty for further conveying | ||
568 | from those to whom you convey the Program, the only way you could | ||
569 | satisfy both those terms and this License would be to refrain entirely | ||
570 | from conveying the Program. | ||
571 | |||
572 | @item Remote Network Interaction; Use with the GNU General Public License. | ||
573 | |||
574 | Notwithstanding any other provision of this License, if you modify the | ||
575 | Program, your modified version must prominently offer all users interacting | ||
576 | with it remotely through a computer network (if your version supports such | ||
577 | interaction) an opportunity to receive the Corresponding Source of your | ||
578 | version by providing access to the Corresponding Source from a network | ||
579 | server at no charge, through some standard or customary means of | ||
580 | facilitating copying of software. This Corresponding Source shall include | ||
581 | the Corresponding Source for any work covered by version 3 of the GNU | ||
582 | General Public License that is incorporated pursuant to the following | ||
583 | paragraph. | ||
584 | |||
585 | Notwithstanding any other provision of this License, you have permission to | ||
586 | link or combine any covered work with a work licensed under version 3 of | ||
587 | the GNU General Public License into a single combined work, and to convey | ||
588 | the resulting work. The terms of this License will continue to apply to | ||
589 | the part which is the covered work, but the work with which it is combined | ||
590 | will remain governed by version 3 of the GNU General Public License. | ||
591 | |||
592 | @item Revised Versions of this License. | ||
593 | |||
594 | The Free Software Foundation may publish revised and/or new versions | ||
595 | of the GNU Affero General Public License from time to time. Such new | ||
596 | versions will be similar in spirit to the present version, but may | ||
597 | differ in detail to address new problems or concerns. | ||
598 | |||
599 | Each version is given a distinguishing version number. If the Program | ||
600 | specifies that a certain numbered version of the GNU Affero General Public | ||
601 | License ``or any later version'' applies to it, you have the option of | ||
602 | following the terms and conditions either of that numbered version or | ||
603 | of any later version published by the Free Software Foundation. If | ||
604 | the Program does not specify a version number of the GNU Affero General | ||
605 | Public License, you may choose any version ever published by the Free | ||
606 | Software Foundation. | ||
607 | |||
608 | If the Program specifies that a proxy can decide which future versions | ||
609 | of the GNU Affero General Public License can be used, that proxy's public | ||
610 | statement of acceptance of a version permanently authorizes you to | ||
611 | choose that version for the Program. | ||
612 | |||
613 | Later license versions may give you additional or different | ||
614 | permissions. However, no additional obligations are imposed on any | ||
615 | author or copyright holder as a result of your choosing to follow a | ||
616 | later version. | ||
617 | |||
618 | @item Disclaimer of Warranty. | ||
619 | |||
620 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY | ||
621 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT | ||
622 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT | ||
623 | WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT | ||
624 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
625 | A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND | ||
626 | PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE | ||
627 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR | ||
628 | CORRECTION. | ||
629 | |||
630 | @item Limitation of Liability. | ||
631 | |||
632 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||
633 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR | ||
634 | CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | ||
635 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES | ||
636 | ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT | ||
637 | NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR | ||
638 | LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM | ||
639 | TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER | ||
640 | PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | ||
641 | |||
642 | @item Interpretation of Sections 15 and 16. | ||
643 | |||
644 | If the disclaimer of warranty and limitation of liability provided | ||
645 | above cannot be given local legal effect according to their terms, | ||
646 | reviewing courts shall apply local law that most closely approximates | ||
647 | an absolute waiver of all civil liability in connection with the | ||
648 | Program, unless a warranty or assumption of liability accompanies a | ||
649 | copy of the Program in return for a fee. | ||
650 | |||
651 | @end enumerate | ||
652 | |||
653 | @heading END OF TERMS AND CONDITIONS | ||
654 | |||
655 | @heading How to Apply These Terms to Your New Programs | ||
656 | |||
657 | If you develop a new program, and you want it to be of the greatest | ||
658 | possible use to the public, the best way to achieve this is to make it | ||
659 | free software which everyone can redistribute and change under these | ||
660 | terms. | ||
661 | |||
662 | To do so, attach the following notices to the program. It is safest | ||
663 | to attach them to the start of each source file to most effectively | ||
664 | state the exclusion of warranty; and each file should have at least | ||
665 | the ``copyright'' line and a pointer to where the full notice is found. | ||
666 | |||
667 | @smallexample | ||
668 | @var{one line to give the program's name and a brief idea of what it does.} | ||
669 | Copyright (C) @var{year} @var{name of author} | ||
670 | |||
671 | This program is free software: you can redistribute it and/or modify | ||
672 | it under the terms of the GNU Affero General Public License as published by | ||
673 | the Free Software Foundation, either version 3 of the License, or (at | ||
674 | your option) any later version. | ||
675 | |||
676 | This program is distributed in the hope that it will be useful, but | ||
677 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
678 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
679 | Affero General Public License for more details. | ||
680 | |||
681 | You should have received a copy of the GNU Affero General Public License | ||
682 | along with this program. If not, see @url{https://www.gnu.org/licenses/}. | ||
683 | @end smallexample | ||
684 | |||
685 | Also add information on how to contact you by electronic and paper mail. | ||
686 | |||
687 | If your software can interact with users remotely through a computer | ||
688 | network, you should also make sure that it provides a way for users to | ||
689 | get its source. For example, if your program is a web application, its | ||
690 | interface could display a ``Source'' link that leads users to an archive | ||
691 | of the code. There are many ways you could offer source, and different | ||
692 | solutions will be better for different programs; see section 13 for the | ||
693 | specific requirements. | ||
694 | |||
695 | You should also get your employer (if you work as a programmer) or school, | ||
696 | if any, to sign a ``copyright disclaimer'' for the program, if necessary. | ||
697 | For more information on this, and how to apply and follow the GNU AGPL, see | ||
698 | @url{https://www.gnu.org/licenses/}. | ||
diff --git a/doc/old/tutorial/docstyle.css b/doc/old/tutorial/docstyle.css new file mode 100644 index 000000000..8719248d0 --- /dev/null +++ b/doc/old/tutorial/docstyle.css | |||
@@ -0,0 +1,76 @@ | |||
1 | html, body { | ||
2 | font-size: 1em; | ||
3 | text-align: left; | ||
4 | text-decoration: none; | ||
5 | } | ||
6 | html { background-color: #e7e7e7; } | ||
7 | |||
8 | body { | ||
9 | max-width: 74.92em; | ||
10 | margin: 0 auto; | ||
11 | padding: .5em 1em 1em 1em; | ||
12 | background-color: white; | ||
13 | border: .1em solid #c0c0c0; | ||
14 | } | ||
15 | |||
16 | h1, h2, h3, h4 { color: #333; } | ||
17 | h5, h6, dt { color: #222; } | ||
18 | |||
19 | |||
20 | a h3 { | ||
21 | color: #005090; | ||
22 | } | ||
23 | |||
24 | a[href] { color: #005090; } | ||
25 | a[href]:visited { color: #100070; } | ||
26 | a[href]:active, a[href]:hover { | ||
27 | color: #100070; | ||
28 | text-decoration: none; | ||
29 | } | ||
30 | |||
31 | .linkrow { | ||
32 | margin: 3em 0; | ||
33 | } | ||
34 | |||
35 | .linkrow { | ||
36 | text-align: center; | ||
37 | } | ||
38 | |||
39 | div.example { padding: .8em 1.2em .4em; } | ||
40 | pre.example { padding: .8em 1.2em; } | ||
41 | div.example, pre.example { | ||
42 | margin: 1em 0 1em 3% ; | ||
43 | -webkit-border-radius: .3em; | ||
44 | -moz-border-radius: .3em; | ||
45 | border-radius: .3em; | ||
46 | border: 1px solid #d4cbb6; | ||
47 | background-color: #f2efe4; | ||
48 | } | ||
49 | div.example > pre.example { | ||
50 | padding: 0 0 .4em; | ||
51 | margin: 0; | ||
52 | border: none; | ||
53 | } | ||
54 | |||
55 | |||
56 | /* This makes the very long tables of contents in Gnulib and other | ||
57 | manuals easier to read. */ | ||
58 | .contents ul, .shortcontents ul { font-weight: bold; } | ||
59 | .contents ul ul, .shortcontents ul ul { font-weight: normal; } | ||
60 | .contents ul { list-style: none; } | ||
61 | |||
62 | /* For colored navigation bars (Emacs manual): make the bar extend | ||
63 | across the whole width of the page and give it a decent height. */ | ||
64 | .header, .node { margin: 0 -1em; padding: 0 1em; } | ||
65 | .header p, .node p { line-height: 2em; } | ||
66 | |||
67 | /* For navigation links */ | ||
68 | .node a, .header a { display: inline-block; line-height: 2em; } | ||
69 | .node a:hover, .header a:hover { background: #f2efe4; } | ||
70 | |||
71 | table.cartouche { | ||
72 | border-collapse: collapse; | ||
73 | border-color: darkred; | ||
74 | border-style: solid; | ||
75 | border-width: 3px; | ||
76 | } | ||
diff --git a/doc/old/tutorial/examples/001.c b/doc/old/tutorial/examples/001.c new file mode 100644 index 000000000..7042118ba --- /dev/null +++ b/doc/old/tutorial/examples/001.c | |||
@@ -0,0 +1,30 @@ | |||
1 | #include "platform.h" | ||
2 | #include <gnunet/platform.h> | ||
3 | #include <gnunet/gnunet_util_lib.h> | ||
4 | |||
5 | static int ret; | ||
6 | |||
7 | static void | ||
8 | run (void *cls, | ||
9 | char *const *args, | ||
10 | const char *cfgfile, | ||
11 | const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
12 | { | ||
13 | // main code here | ||
14 | ret = 0; | ||
15 | } | ||
16 | |||
17 | int | ||
18 | main (int argc, char *const *argv) | ||
19 | { | ||
20 | struct GNUNET_GETOPT_CommandLineOption options[] = { | ||
21 | GNUNET_GETOPT_OPTION_END | ||
22 | }; | ||
23 | return (GNUNET_OK == | ||
24 | GNUNET_PROGRAM_run (argc, | ||
25 | argv, | ||
26 | "binary-name", | ||
27 | gettext_noop ("binary description text"), | ||
28 | options, &run, NULL)) ? ret : 1; | ||
29 | } | ||
30 | |||
diff --git a/doc/old/tutorial/examples/002.c b/doc/old/tutorial/examples/002.c new file mode 100644 index 000000000..02233fd61 --- /dev/null +++ b/doc/old/tutorial/examples/002.c | |||
@@ -0,0 +1,17 @@ | |||
1 | static char *string_option; | ||
2 | static int a_flag; | ||
3 | |||
4 | // ... | ||
5 | struct GNUNET_GETOPT_CommandLineOption options[] = { | ||
6 | GNUNET_GETOPT_option_string ('s', "name", "SOMESTRING", | ||
7 | gettext_noop ("text describing the string_option NAME"), | ||
8 | &string_option}, | ||
9 | GNUNET_GETOPT_option_flag ('f', "flag", | ||
10 | gettext_noop ("text describing the flag option"), | ||
11 | &a_flag), | ||
12 | GNUNET_GETOPT_OPTION_END | ||
13 | }; | ||
14 | string_option = NULL; | ||
15 | a_flag = GNUNET_SYSERR; | ||
16 | // ... | ||
17 | |||
diff --git a/doc/old/tutorial/examples/003.c b/doc/old/tutorial/examples/003.c new file mode 100644 index 000000000..d158d7e75 --- /dev/null +++ b/doc/old/tutorial/examples/003.c | |||
@@ -0,0 +1,11 @@ | |||
1 | struct GNUNET_MQ_MessageHandlers handlers[] = { | ||
2 | // ... | ||
3 | GNUNET_MQ_handler_end () | ||
4 | }; | ||
5 | struct GNUNET_MQ_Handle *mq; | ||
6 | |||
7 | mq = GNUNET_CLIENT_connect (cfg, | ||
8 | "service-name", | ||
9 | handlers, | ||
10 | &error_cb, | ||
11 | NULL); | ||
diff --git a/doc/old/tutorial/examples/004.c b/doc/old/tutorial/examples/004.c new file mode 100644 index 000000000..0ef007907 --- /dev/null +++ b/doc/old/tutorial/examples/004.c | |||
@@ -0,0 +1,5 @@ | |||
1 | struct GNUNET_MessageHeader | ||
2 | { | ||
3 | uint16_t size GNUNET_PACKED; | ||
4 | uint16_t type GNUNET_PACKED; | ||
5 | }; | ||
diff --git a/doc/old/tutorial/examples/005.c b/doc/old/tutorial/examples/005.c new file mode 100644 index 000000000..1b59f85a6 --- /dev/null +++ b/doc/old/tutorial/examples/005.c | |||
@@ -0,0 +1,9 @@ | |||
1 | struct GNUNET_MQ_Envelope *env; | ||
2 | struct GNUNET_MessageHeader *msg; | ||
3 | |||
4 | env = GNUNET_MQ_msg_extra (msg, payload_size, GNUNET_MY_MESSAGE_TYPE); | ||
5 | GNUNET_memcpy (&msg[1], | ||
6 | &payload, | ||
7 | payload_size); | ||
8 | // Send message via message queue 'mq' | ||
9 | GNUNET_mq_send (mq, env); | ||
diff --git a/doc/old/tutorial/examples/006.c b/doc/old/tutorial/examples/006.c new file mode 100644 index 000000000..944d2b18c --- /dev/null +++ b/doc/old/tutorial/examples/006.c | |||
@@ -0,0 +1,31 @@ | |||
1 | static void | ||
2 | handle_fix (void *cls, const struct MyMessage *msg) | ||
3 | { | ||
4 | // process 'msg' | ||
5 | } | ||
6 | |||
7 | static int | ||
8 | check_var (void *cls, const struct MyVarMessage *msg) | ||
9 | { | ||
10 | // check 'msg' is well-formed | ||
11 | return GNUNET_OK; | ||
12 | } | ||
13 | |||
14 | static void | ||
15 | handle_var (void *cls, const struct MyVarMessage *msg) | ||
16 | { | ||
17 | // process 'msg' | ||
18 | } | ||
19 | |||
20 | struct GNUNET_MQ_MessageHandler handlers[] = { | ||
21 | GNUNET_MQ_hd_fixed_size (fix, | ||
22 | GNUNET_MESSAGE_TYPE_MY_FIX, | ||
23 | struct MyMessage, | ||
24 | NULL), | ||
25 | GNUNET_MQ_hd_fixed_size (var, | ||
26 | GNUNET_MESSAGE_TYPE_MY_VAR, | ||
27 | struct MyVarMessage, | ||
28 | NULL), | ||
29 | |||
30 | GNUNET_MQ_handler_end () | ||
31 | }; | ||
diff --git a/doc/old/tutorial/examples/007.c b/doc/old/tutorial/examples/007.c new file mode 100644 index 000000000..096539e43 --- /dev/null +++ b/doc/old/tutorial/examples/007.c | |||
@@ -0,0 +1,10 @@ | |||
1 | GNUNET_SERVICE_MAIN | ||
2 | ("service-name", | ||
3 | GNUNET_SERVICE_OPTION_NONE, | ||
4 | &run, | ||
5 | &client_connect_cb, | ||
6 | &client_disconnect_cb, | ||
7 | NULL, | ||
8 | GNUNET_MQ_hd_fixed_size (...), | ||
9 | GNUNET_MQ_hd_var_size (...), | ||
10 | GNUNET_MQ_handler_end ()); | ||
diff --git a/doc/old/tutorial/examples/008.c b/doc/old/tutorial/examples/008.c new file mode 100644 index 000000000..2dffe2cf9 --- /dev/null +++ b/doc/old/tutorial/examples/008.c | |||
@@ -0,0 +1,22 @@ | |||
1 | static void | ||
2 | run (void *cls, | ||
3 | const struct GNUNET_CONFIGURATION_Handle *c, | ||
4 | struct GNUNET_SERVICE_Handle *service) | ||
5 | { | ||
6 | } | ||
7 | |||
8 | static void * | ||
9 | client_connect_cb (void *cls, | ||
10 | struct GNUNET_SERVICE_Client *c, | ||
11 | struct GNUNET_MQ_Handle *mq) | ||
12 | { | ||
13 | return c; | ||
14 | } | ||
15 | |||
16 | static void | ||
17 | client_disconnect_cb (void *cls, | ||
18 | struct GNUNET_SERVICE_Client *c, | ||
19 | void *internal_cls) | ||
20 | { | ||
21 | GNUNET_assert (c == internal_cls); | ||
22 | } | ||
diff --git a/doc/old/tutorial/examples/009.c b/doc/old/tutorial/examples/009.c new file mode 100644 index 000000000..9d6fdd7e7 --- /dev/null +++ b/doc/old/tutorial/examples/009.c | |||
@@ -0,0 +1,10 @@ | |||
1 | #include "platform.h" | ||
2 | #include <gnunet/gnunet_core_service.h> | ||
3 | |||
4 | struct GNUNET_CORE_Handle * | ||
5 | GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
6 | void *cls, | ||
7 | GNUNET_CORE_StartupCallback init, | ||
8 | GNUNET_CORE_ConnectEventHandler connects, | ||
9 | GNUNET_CORE_DisconnectEventHandler disconnects, | ||
10 | const struct GNUNET_MQ_MessageHandler *handlers); | ||
diff --git a/doc/old/tutorial/examples/010.c b/doc/old/tutorial/examples/010.c new file mode 100644 index 000000000..33494490d --- /dev/null +++ b/doc/old/tutorial/examples/010.c | |||
@@ -0,0 +1,8 @@ | |||
1 | void * | ||
2 | connects (void *cls, | ||
3 | const struct GNUNET_PeerIdentity *peer, | ||
4 | struct GNUNET_MQ_Handle *mq) | ||
5 | { | ||
6 | return mq; | ||
7 | } | ||
8 | |||
diff --git a/doc/old/tutorial/examples/011.c b/doc/old/tutorial/examples/011.c new file mode 100644 index 000000000..23bc051de --- /dev/null +++ b/doc/old/tutorial/examples/011.c | |||
@@ -0,0 +1,8 @@ | |||
1 | void | ||
2 | disconnects (void *cls, | ||
3 | const struct GNUNET_PeerIdentity * peer) | ||
4 | { | ||
5 | /* Remove peer's identity from known peers */ | ||
6 | /* Make sure no messages are sent to peer from now on */ | ||
7 | } | ||
8 | |||
diff --git a/doc/old/tutorial/examples/012.c b/doc/old/tutorial/examples/012.c new file mode 100644 index 000000000..dc59eb506 --- /dev/null +++ b/doc/old/tutorial/examples/012.c | |||
@@ -0,0 +1,5 @@ | |||
1 | #include "platform.h" | ||
2 | #include "gnunet_peerstore_service.h" | ||
3 | |||
4 | peerstore_handle = GNUNET_PEERSTORE_connect (cfg); | ||
5 | |||
diff --git a/doc/old/tutorial/examples/013.1.c b/doc/old/tutorial/examples/013.1.c new file mode 100644 index 000000000..fa5212868 --- /dev/null +++ b/doc/old/tutorial/examples/013.1.c | |||
@@ -0,0 +1,3 @@ | |||
1 | void | ||
2 | GNUNET_PEERSTORE_store_cancel (struct GNUNET_PEERSTORE_StoreContext | ||
3 | *sc); | ||
diff --git a/doc/old/tutorial/examples/013.c b/doc/old/tutorial/examples/013.c new file mode 100644 index 000000000..6792417e1 --- /dev/null +++ b/doc/old/tutorial/examples/013.c | |||
@@ -0,0 +1,12 @@ | |||
1 | struct GNUNET_PEERSTORE_StoreContext * | ||
2 | GNUNET_PEERSTORE_store (struct GNUNET_PEERSTORE_Handle *h, | ||
3 | const char *sub_system, | ||
4 | const struct GNUNET_PeerIdentity *peer, | ||
5 | const char *key, | ||
6 | const void *value, | ||
7 | size_t size, | ||
8 | struct GNUNET_TIME_Absolute expiry, | ||
9 | enum GNUNET_PEERSTORE_StoreOption options, | ||
10 | GNUNET_PEERSTORE_Continuation cont, | ||
11 | void *cont_cls); | ||
12 | |||
diff --git a/doc/old/tutorial/examples/014.c b/doc/old/tutorial/examples/014.c new file mode 100644 index 000000000..db2ed1165 --- /dev/null +++ b/doc/old/tutorial/examples/014.c | |||
@@ -0,0 +1,8 @@ | |||
1 | struct GNUNET_PEERSTORE_IterateContext * | ||
2 | GNUNET_PEERSTORE_iterate (struct GNUNET_PEERSTORE_Handle *h, | ||
3 | const char *sub_system, | ||
4 | const struct GNUNET_PeerIdentity *peer, | ||
5 | const char *key, | ||
6 | GNUNET_PEERSTORE_Processor callback, | ||
7 | void *callback_cls); | ||
8 | |||
diff --git a/doc/old/tutorial/examples/015.c b/doc/old/tutorial/examples/015.c new file mode 100644 index 000000000..0dd267e8e --- /dev/null +++ b/doc/old/tutorial/examples/015.c | |||
@@ -0,0 +1,8 @@ | |||
1 | struct GNUNET_PEERSTORE_WatchContext * | ||
2 | GNUNET_PEERSTORE_watch (struct GNUNET_PEERSTORE_Handle *h, | ||
3 | const char *sub_system, | ||
4 | const struct GNUNET_PeerIdentity *peer, | ||
5 | const char *key, | ||
6 | GNUNET_PEERSTORE_Processor callback, | ||
7 | void *callback_cls); | ||
8 | |||
diff --git a/doc/old/tutorial/examples/016.c b/doc/old/tutorial/examples/016.c new file mode 100644 index 000000000..d169da16d --- /dev/null +++ b/doc/old/tutorial/examples/016.c | |||
@@ -0,0 +1,4 @@ | |||
1 | void | ||
2 | GNUNET_PEERSTORE_watch_cancel (struct GNUNET_PEERSTORE_WatchContext | ||
3 | *wc); | ||
4 | |||
diff --git a/doc/old/tutorial/examples/017.c b/doc/old/tutorial/examples/017.c new file mode 100644 index 000000000..c86fbcd1f --- /dev/null +++ b/doc/old/tutorial/examples/017.c | |||
@@ -0,0 +1,4 @@ | |||
1 | void | ||
2 | GNUNET_PEERSTORE_disconnect (struct GNUNET_PEERSTORE_Handle *h, | ||
3 | int sync_first); | ||
4 | |||
diff --git a/doc/old/tutorial/examples/018.c b/doc/old/tutorial/examples/018.c new file mode 100644 index 000000000..3fc22584c --- /dev/null +++ b/doc/old/tutorial/examples/018.c | |||
@@ -0,0 +1,2 @@ | |||
1 | dht_handle = GNUNET_DHT_connect (cfg, parallel_requests); | ||
2 | |||
diff --git a/doc/old/tutorial/examples/019.c b/doc/old/tutorial/examples/019.c new file mode 100644 index 000000000..aaf001516 --- /dev/null +++ b/doc/old/tutorial/examples/019.c | |||
@@ -0,0 +1,18 @@ | |||
1 | message_sent_cont (void *cls, | ||
2 | const struct GNUNET_SCHEDULER_TaskContext *tc) | ||
3 | { | ||
4 | // Request has left local node | ||
5 | } | ||
6 | |||
7 | struct GNUNET_DHT_PutHandle * | ||
8 | GNUNET_DHT_put (struct GNUNET_DHT_Handle *handle, | ||
9 | const struct GNUNET_HashCode *key, | ||
10 | uint32_t desired_replication_level, | ||
11 | enum GNUNET_DHT_RouteOption options, | ||
12 | enum GNUNET_BLOCK_Type type, | ||
13 | size_t size, | ||
14 | const void *data, | ||
15 | struct GNUNET_TIME_Absolute exp, | ||
16 | struct GNUNET_TIME_Relative timeout, | ||
17 | GNUNET_DHT_PutContinuation cont, void *cont_cls) | ||
18 | |||
diff --git a/doc/old/tutorial/examples/020.c b/doc/old/tutorial/examples/020.c new file mode 100644 index 000000000..596db3069 --- /dev/null +++ b/doc/old/tutorial/examples/020.c | |||
@@ -0,0 +1,25 @@ | |||
1 | static void | ||
2 | get_result_iterator (void *cls, struct GNUNET_TIME_Absolute expiration, | ||
3 | const struct GNUNET_HashCode *key, | ||
4 | const struct GNUNET_PeerIdentity *get_path, | ||
5 | unsigned int get_path_length, | ||
6 | const struct GNUNET_PeerIdentity *put_path, | ||
7 | unsigned int put_path_length, | ||
8 | enum GNUNET_BLOCK_Type type, size_t size, | ||
9 | const void *data) | ||
10 | { | ||
11 | // Optionally: | ||
12 | GNUNET_DHT_get_stop (get_handle); | ||
13 | } | ||
14 | |||
15 | get_handle = | ||
16 | GNUNET_DHT_get_start (dht_handle, | ||
17 | block_type, | ||
18 | &key, | ||
19 | replication, | ||
20 | GNUNET_DHT_RO_NONE, | ||
21 | NULL, | ||
22 | 0, | ||
23 | &get_result_iterator, | ||
24 | cls) | ||
25 | |||
diff --git a/doc/old/tutorial/examples/021.c b/doc/old/tutorial/examples/021.c new file mode 100644 index 000000000..688a31fe0 --- /dev/null +++ b/doc/old/tutorial/examples/021.c | |||
@@ -0,0 +1,13 @@ | |||
1 | static enum GNUNET_BLOCK_EvaluationResult | ||
2 | block_plugin_SERVICE_evaluate (void *cls, | ||
3 | enum GNUNET_BLOCK_Type type, | ||
4 | struct GNUNET_BlockGroup *bg, | ||
5 | const GNUNET_HashCode *query, | ||
6 | const void *xquery, | ||
7 | size_t xquery_size, | ||
8 | const void *reply_block, | ||
9 | size_t reply_block_size) | ||
10 | { | ||
11 | // Verify type, block and bg | ||
12 | } | ||
13 | |||
diff --git a/doc/old/tutorial/examples/022.c b/doc/old/tutorial/examples/022.c new file mode 100644 index 000000000..a373619bd --- /dev/null +++ b/doc/old/tutorial/examples/022.c | |||
@@ -0,0 +1,8 @@ | |||
1 | static int | ||
2 | block_plugin_SERVICE_get_key (void *cls, enum GNUNET_BLOCK_Type type, | ||
3 | const void *block, size_t block_size, | ||
4 | struct GNUNET_HashCode *key) | ||
5 | { | ||
6 | // Store the key in the key argument, return GNUNET_OK on success. | ||
7 | } | ||
8 | |||
diff --git a/doc/old/tutorial/examples/023.c b/doc/old/tutorial/examples/023.c new file mode 100644 index 000000000..820c38b10 --- /dev/null +++ b/doc/old/tutorial/examples/023.c | |||
@@ -0,0 +1,17 @@ | |||
1 | void * | ||
2 | libgnunet_plugin_block_SERVICE_init (void *cls) | ||
3 | { | ||
4 | static enum GNUNET_BLOCK_Type types[] = | ||
5 | { | ||
6 | GNUNET_BLOCK_TYPE_SERVICE_BLOCKYPE, | ||
7 | GNUNET_BLOCK_TYPE_ANY | ||
8 | }; | ||
9 | struct GNUNET_BLOCK_PluginFunctions *api; | ||
10 | |||
11 | api = GNUNET_new (struct GNUNET_BLOCK_PluginFunctions); | ||
12 | api->evaluate = &block_plugin_SERICE_evaluate; | ||
13 | api->get_key = &block_plugin_SERVICE_get_key; | ||
14 | api->types = types; | ||
15 | return api; | ||
16 | } | ||
17 | |||
diff --git a/doc/old/tutorial/examples/024.c b/doc/old/tutorial/examples/024.c new file mode 100644 index 000000000..2e84b5905 --- /dev/null +++ b/doc/old/tutorial/examples/024.c | |||
@@ -0,0 +1,9 @@ | |||
1 | void * | ||
2 | libgnunet_plugin_block_SERVICE_done (void *cls) | ||
3 | { | ||
4 | struct GNUNET_TRANSPORT_PluginFunctions *api = cls; | ||
5 | |||
6 | GNUNET_free (api); | ||
7 | return NULL; | ||
8 | } | ||
9 | |||
diff --git a/doc/old/tutorial/examples/025.Makefile.am b/doc/old/tutorial/examples/025.Makefile.am new file mode 100644 index 000000000..66d4f80ec --- /dev/null +++ b/doc/old/tutorial/examples/025.Makefile.am | |||
@@ -0,0 +1,15 @@ | |||
1 | plugindir = $(libdir)/gnunet | ||
2 | |||
3 | plugin_LTLIBRARIES = \ | ||
4 | libgnunet_plugin_block_ext.la | ||
5 | libgnunet_plugin_block_ext_la_SOURCES = \ | ||
6 | plugin_block_ext.c | ||
7 | libgnunet_plugin_block_ext_la_LIBADD = \ | ||
8 | $(prefix)/lib/libgnunethello.la \ | ||
9 | $(prefix)/lib/libgnunetblock.la \ | ||
10 | $(prefix)/lib/libgnunetutil.la | ||
11 | libgnunet_plugin_block_ext_la_LDFLAGS = \ | ||
12 | $(GN_PLUGIN_LDFLAGS) | ||
13 | libgnunet_plugin_block_ext_la_DEPENDENCIES = \ | ||
14 | $(prefix)/lib/libgnunetblock.la | ||
15 | |||
diff --git a/doc/old/tutorial/examples/026.c b/doc/old/tutorial/examples/026.c new file mode 100644 index 000000000..264e0b6b9 --- /dev/null +++ b/doc/old/tutorial/examples/026.c | |||
@@ -0,0 +1,52 @@ | |||
1 | static void | ||
2 | get_callback (void *cls, | ||
3 | enum GNUNET_DHT_RouteOption options, | ||
4 | enum GNUNET_BLOCK_Type type, | ||
5 | uint32_t hop_count, | ||
6 | uint32_t desired_replication_level, | ||
7 | unsigned int path_length, | ||
8 | const struct GNUNET_PeerIdentity *path, | ||
9 | const struct GNUNET_HashCode * key) | ||
10 | { | ||
11 | } | ||
12 | |||
13 | |||
14 | static void | ||
15 | get_resp_callback (void *cls, | ||
16 | enum GNUNET_BLOCK_Type type, | ||
17 | const struct GNUNET_PeerIdentity *get_path, | ||
18 | unsigned int get_path_length, | ||
19 | const struct GNUNET_PeerIdentity *put_path, | ||
20 | unsigned int put_path_length, | ||
21 | struct GNUNET_TIME_Absolute exp, | ||
22 | const struct GNUNET_HashCode * key, | ||
23 | const void *data, | ||
24 | size_t size) | ||
25 | { | ||
26 | } | ||
27 | |||
28 | |||
29 | static void | ||
30 | put_callback (void *cls, | ||
31 | enum GNUNET_DHT_RouteOption options, | ||
32 | enum GNUNET_BLOCK_Type type, | ||
33 | uint32_t hop_count, | ||
34 | uint32_t desired_replication_level, | ||
35 | unsigned int path_length, | ||
36 | const struct GNUNET_PeerIdentity *path, | ||
37 | struct GNUNET_TIME_Absolute exp, | ||
38 | const struct GNUNET_HashCode * key, | ||
39 | const void *data, | ||
40 | size_t size) | ||
41 | { | ||
42 | } | ||
43 | |||
44 | |||
45 | monitor_handle = GNUNET_DHT_monitor_start (dht_handle, | ||
46 | block_type, | ||
47 | key, | ||
48 | &get_callback, | ||
49 | &get_resp_callback, | ||
50 | &put_callback, | ||
51 | cls); | ||
52 | |||
diff --git a/doc/old/tutorial/examples/testbed_test.c b/doc/old/tutorial/examples/testbed_test.c new file mode 100644 index 000000000..1a8c25655 --- /dev/null +++ b/doc/old/tutorial/examples/testbed_test.c | |||
@@ -0,0 +1,100 @@ | |||
1 | #include "platform.h" | ||
2 | #include <unistd.h> | ||
3 | #include <gnunet/platform.h> | ||
4 | #include <gnunet/gnunet_util_lib.h> | ||
5 | #include <gnunet/gnunet_testbed_service.h> | ||
6 | #include <gnunet/gnunet_dht_service.h> | ||
7 | |||
8 | #define NUM_PEERS 20 | ||
9 | |||
10 | static struct GNUNET_TESTBED_Operation *dht_op; | ||
11 | |||
12 | static struct GNUNET_DHT_Handle *dht_handle; | ||
13 | |||
14 | |||
15 | struct MyContext | ||
16 | { | ||
17 | int ht_len; | ||
18 | } ctxt; | ||
19 | |||
20 | |||
21 | static int result; | ||
22 | |||
23 | |||
24 | static void | ||
25 | shutdown_task (void *cls) | ||
26 | { | ||
27 | if (NULL != dht_op) | ||
28 | { | ||
29 | GNUNET_TESTBED_operation_done (dht_op); | ||
30 | dht_op = NULL; | ||
31 | dht_handle = NULL; | ||
32 | } | ||
33 | result = GNUNET_OK; | ||
34 | } | ||
35 | |||
36 | |||
37 | static void | ||
38 | service_connect_comp (void *cls, | ||
39 | struct GNUNET_TESTBED_Operation *op, | ||
40 | void *ca_result, | ||
41 | const char *emsg) | ||
42 | { | ||
43 | GNUNET_assert (op == dht_op); | ||
44 | dht_handle = ca_result; | ||
45 | // Do work here... | ||
46 | GNUNET_SCHEDULER_shutdown (); | ||
47 | } | ||
48 | |||
49 | |||
50 | static void * | ||
51 | dht_ca (void *cls, const struct GNUNET_CONFIGURATION_Handle *cfg) | ||
52 | { | ||
53 | struct MyContext *ctxt = cls; | ||
54 | |||
55 | dht_handle = GNUNET_DHT_connect (cfg, ctxt->ht_len); | ||
56 | return dht_handle; | ||
57 | } | ||
58 | |||
59 | |||
60 | static void | ||
61 | dht_da (void *cls, void *op_result) | ||
62 | { | ||
63 | struct MyContext *ctxt = cls; | ||
64 | |||
65 | GNUNET_DHT_disconnect ((struct GNUNET_DHT_Handle *) op_result); | ||
66 | dht_handle = NULL; | ||
67 | } | ||
68 | |||
69 | |||
70 | static void | ||
71 | test_master (void *cls, | ||
72 | struct GNUNET_TESTBED_RunHandle *h, | ||
73 | unsigned int num_peers, | ||
74 | struct GNUNET_TESTBED_Peer **peers, | ||
75 | unsigned int links_succeeded, | ||
76 | unsigned int links_failed) | ||
77 | { | ||
78 | ctxt.ht_len = 10; | ||
79 | dht_op = GNUNET_TESTBED_service_connect | ||
80 | (NULL, peers[0], "dht", | ||
81 | &service_connect_comp, NULL, | ||
82 | &dht_ca, &dht_da, &ctxt); | ||
83 | GNUNET_SCHEDULER_add_shutdown (&shutdown_task, NULL); | ||
84 | } | ||
85 | |||
86 | |||
87 | int | ||
88 | main (int argc, char **argv) | ||
89 | { | ||
90 | int ret; | ||
91 | |||
92 | result = GNUNET_SYSERR; | ||
93 | ret = GNUNET_TESTBED_test_run | ||
94 | ("awesome-test", "template.conf", | ||
95 | NUM_PEERS, 0LL, | ||
96 | NULL, NULL, &test_master, NULL); | ||
97 | if ( (GNUNET_OK != ret) || (GNUNET_OK != result) ) | ||
98 | return 1; | ||
99 | return 0; | ||
100 | } | ||
diff --git a/doc/old/tutorial/fdl-1.3.texi b/doc/old/tutorial/fdl-1.3.texi new file mode 100644 index 000000000..cb71f05a1 --- /dev/null +++ b/doc/old/tutorial/fdl-1.3.texi | |||
@@ -0,0 +1,505 @@ | |||
1 | @c The GNU Free Documentation License. | ||
2 | @center Version 1.3, 3 November 2008 | ||
3 | |||
4 | @c This file is intended to be included within another document, | ||
5 | @c hence no sectioning command or @node. | ||
6 | |||
7 | @display | ||
8 | Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. | ||
9 | @uref{http://fsf.org/} | ||
10 | |||
11 | Everyone is permitted to copy and distribute verbatim copies | ||
12 | of this license document, but changing it is not allowed. | ||
13 | @end display | ||
14 | |||
15 | @enumerate 0 | ||
16 | @item | ||
17 | PREAMBLE | ||
18 | |||
19 | The purpose of this License is to make a manual, textbook, or other | ||
20 | functional and useful document @dfn{free} in the sense of freedom: to | ||
21 | assure everyone the effective freedom to copy and redistribute it, | ||
22 | with or without modifying it, either commercially or noncommercially. | ||
23 | Secondarily, this License preserves for the author and publisher a way | ||
24 | to get credit for their work, while not being considered responsible | ||
25 | for modifications made by others. | ||
26 | |||
27 | This License is a kind of ``copyleft'', which means that derivative | ||
28 | works of the document must themselves be free in the same sense. It | ||
29 | complements the GNU General Public License, which is a copyleft | ||
30 | license designed for free software. | ||
31 | |||
32 | We have designed this License in order to use it for manuals for free | ||
33 | software, because free software needs free documentation: a free | ||
34 | program should come with manuals providing the same freedoms that the | ||
35 | software does. But this License is not limited to software manuals; | ||
36 | it can be used for any textual work, regardless of subject matter or | ||
37 | whether it is published as a printed book. We recommend this License | ||
38 | principally for works whose purpose is instruction or reference. | ||
39 | |||
40 | @item | ||
41 | APPLICABILITY AND DEFINITIONS | ||
42 | |||
43 | This License applies to any manual or other work, in any medium, that | ||
44 | contains a notice placed by the copyright holder saying it can be | ||
45 | distributed under the terms of this License. Such a notice grants a | ||
46 | world-wide, royalty-free license, unlimited in duration, to use that | ||
47 | work under the conditions stated herein. The ``Document'', below, | ||
48 | refers to any such manual or work. Any member of the public is a | ||
49 | licensee, and is addressed as ``you''. You accept the license if you | ||
50 | copy, modify or distribute the work in a way requiring permission | ||
51 | under copyright law. | ||
52 | |||
53 | A ``Modified Version'' of the Document means any work containing the | ||
54 | Document or a portion of it, either copied verbatim, or with | ||
55 | modifications and/or translated into another language. | ||
56 | |||
57 | A ``Secondary Section'' is a named appendix or a front-matter section | ||
58 | of the Document that deals exclusively with the relationship of the | ||
59 | publishers or authors of the Document to the Document's overall | ||
60 | subject (or to related matters) and contains nothing that could fall | ||
61 | directly within that overall subject. (Thus, if the Document is in | ||
62 | part a textbook of mathematics, a Secondary Section may not explain | ||
63 | any mathematics.) The relationship could be a matter of historical | ||
64 | connection with the subject or with related matters, or of legal, | ||
65 | commercial, philosophical, ethical or political position regarding | ||
66 | them. | ||
67 | |||
68 | The ``Invariant Sections'' are certain Secondary Sections whose titles | ||
69 | are designated, as being those of Invariant Sections, in the notice | ||
70 | that says that the Document is released under this License. If a | ||
71 | section does not fit the above definition of Secondary then it is not | ||
72 | allowed to be designated as Invariant. The Document may contain zero | ||
73 | Invariant Sections. If the Document does not identify any Invariant | ||
74 | Sections then there are none. | ||
75 | |||
76 | The ``Cover Texts'' are certain short passages of text that are listed, | ||
77 | as Front-Cover Texts or Back-Cover Texts, in the notice that says that | ||
78 | the Document is released under this License. A Front-Cover Text may | ||
79 | be at most 5 words, and a Back-Cover Text may be at most 25 words. | ||
80 | |||
81 | A ``Transparent'' copy of the Document means a machine-readable copy, | ||
82 | represented in a format whose specification is available to the | ||
83 | general public, that is suitable for revising the document | ||
84 | straightforwardly with generic text editors or (for images composed of | ||
85 | pixels) generic paint programs or (for drawings) some widely available | ||
86 | drawing editor, and that is suitable for input to text formatters or | ||
87 | for automatic translation to a variety of formats suitable for input | ||
88 | to text formatters. A copy made in an otherwise Transparent file | ||
89 | format whose markup, or absence of markup, has been arranged to thwart | ||
90 | or discourage subsequent modification by readers is not Transparent. | ||
91 | An image format is not Transparent if used for any substantial amount | ||
92 | of text. A copy that is not ``Transparent'' is called ``Opaque''. | ||
93 | |||
94 | Examples of suitable formats for Transparent copies include plain | ||
95 | ASCII without markup, Texinfo input format, La@TeX{} input | ||
96 | format, SGML or XML using a publicly available | ||
97 | DTD, and standard-conforming simple HTML, | ||
98 | PostScript or PDF designed for human modification. Examples | ||
99 | of transparent image formats include PNG, XCF and | ||
100 | JPG. Opaque formats include proprietary formats that can be | ||
101 | read and edited only by proprietary word processors, SGML or | ||
102 | XML for which the DTD and/or processing tools are | ||
103 | not generally available, and the machine-generated HTML, | ||
104 | PostScript or PDF produced by some word processors for | ||
105 | output purposes only. | ||
106 | |||
107 | The ``Title Page'' means, for a printed book, the title page itself, | ||
108 | plus such following pages as are needed to hold, legibly, the material | ||
109 | this License requires to appear in the title page. For works in | ||
110 | formats which do not have any title page as such, ``Title Page'' means | ||
111 | the text near the most prominent appearance of the work's title, | ||
112 | preceding the beginning of the body of the text. | ||
113 | |||
114 | The ``publisher'' means any person or entity that distributes copies | ||
115 | of the Document to the public. | ||
116 | |||
117 | A section ``Entitled XYZ'' means a named subunit of the Document whose | ||
118 | title either is precisely XYZ or contains XYZ in parentheses following | ||
119 | text that translates XYZ in another language. (Here XYZ stands for a | ||
120 | specific section name mentioned below, such as ``Acknowledgements'', | ||
121 | ``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title'' | ||
122 | of such a section when you modify the Document means that it remains a | ||
123 | section ``Entitled XYZ'' according to this definition. | ||
124 | |||
125 | The Document may include Warranty Disclaimers next to the notice which | ||
126 | states that this License applies to the Document. These Warranty | ||
127 | Disclaimers are considered to be included by reference in this | ||
128 | License, but only as regards disclaiming warranties: any other | ||
129 | implication that these Warranty Disclaimers may have is void and has | ||
130 | no effect on the meaning of this License. | ||
131 | |||
132 | @item | ||
133 | VERBATIM COPYING | ||
134 | |||
135 | You may copy and distribute the Document in any medium, either | ||
136 | commercially or noncommercially, provided that this License, the | ||
137 | copyright notices, and the license notice saying this License applies | ||
138 | to the Document are reproduced in all copies, and that you add no other | ||
139 | conditions whatsoever to those of this License. You may not use | ||
140 | technical measures to obstruct or control the reading or further | ||
141 | copying of the copies you make or distribute. However, you may accept | ||
142 | compensation in exchange for copies. If you distribute a large enough | ||
143 | number of copies you must also follow the conditions in section 3. | ||
144 | |||
145 | You may also lend copies, under the same conditions stated above, and | ||
146 | you may publicly display copies. | ||
147 | |||
148 | @item | ||
149 | COPYING IN QUANTITY | ||
150 | |||
151 | If you publish printed copies (or copies in media that commonly have | ||
152 | printed covers) of the Document, numbering more than 100, and the | ||
153 | Document's license notice requires Cover Texts, you must enclose the | ||
154 | copies in covers that carry, clearly and legibly, all these Cover | ||
155 | Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on | ||
156 | the back cover. Both covers must also clearly and legibly identify | ||
157 | you as the publisher of these copies. The front cover must present | ||
158 | the full title with all words of the title equally prominent and | ||
159 | visible. You may add other material on the covers in addition. | ||
160 | Copying with changes limited to the covers, as long as they preserve | ||
161 | the title of the Document and satisfy these conditions, can be treated | ||
162 | as verbatim copying in other respects. | ||
163 | |||
164 | If the required texts for either cover are too voluminous to fit | ||
165 | legibly, you should put the first ones listed (as many as fit | ||
166 | reasonably) on the actual cover, and continue the rest onto adjacent | ||
167 | pages. | ||
168 | |||
169 | If you publish or distribute Opaque copies of the Document numbering | ||
170 | more than 100, you must either include a machine-readable Transparent | ||
171 | copy along with each Opaque copy, or state in or with each Opaque copy | ||
172 | a computer-network location from which the general network-using | ||
173 | public has access to download using public-standard network protocols | ||
174 | a complete Transparent copy of the Document, free of added material. | ||
175 | If you use the latter option, you must take reasonably prudent steps, | ||
176 | when you begin distribution of Opaque copies in quantity, to ensure | ||
177 | that this Transparent copy will remain thus accessible at the stated | ||
178 | location until at least one year after the last time you distribute an | ||
179 | Opaque copy (directly or through your agents or retailers) of that | ||
180 | edition to the public. | ||
181 | |||
182 | It is requested, but not required, that you contact the authors of the | ||
183 | Document well before redistributing any large number of copies, to give | ||
184 | them a chance to provide you with an updated version of the Document. | ||
185 | |||
186 | @item | ||
187 | MODIFICATIONS | ||
188 | |||
189 | You may copy and distribute a Modified Version of the Document under | ||
190 | the conditions of sections 2 and 3 above, provided that you release | ||
191 | the Modified Version under precisely this License, with the Modified | ||
192 | Version filling the role of the Document, thus licensing distribution | ||
193 | and modification of the Modified Version to whoever possesses a copy | ||
194 | of it. In addition, you must do these things in the Modified Version: | ||
195 | |||
196 | @enumerate A | ||
197 | @item | ||
198 | Use in the Title Page (and on the covers, if any) a title distinct | ||
199 | from that of the Document, and from those of previous versions | ||
200 | (which should, if there were any, be listed in the History section | ||
201 | of the Document). You may use the same title as a previous version | ||
202 | if the original publisher of that version gives permission. | ||
203 | |||
204 | @item | ||
205 | List on the Title Page, as authors, one or more persons or entities | ||
206 | responsible for authorship of the modifications in the Modified | ||
207 | Version, together with at least five of the principal authors of the | ||
208 | Document (all of its principal authors, if it has fewer than five), | ||
209 | unless they release you from this requirement. | ||
210 | |||
211 | @item | ||
212 | State on the Title page the name of the publisher of the | ||
213 | Modified Version, as the publisher. | ||
214 | |||
215 | @item | ||
216 | Preserve all the copyright notices of the Document. | ||
217 | |||
218 | @item | ||
219 | Add an appropriate copyright notice for your modifications | ||
220 | adjacent to the other copyright notices. | ||
221 | |||
222 | @item | ||
223 | Include, immediately after the copyright notices, a license notice | ||
224 | giving the public permission to use the Modified Version under the | ||
225 | terms of this License, in the form shown in the Addendum below. | ||
226 | |||
227 | @item | ||
228 | Preserve in that license notice the full lists of Invariant Sections | ||
229 | and required Cover Texts given in the Document's license notice. | ||
230 | |||
231 | @item | ||
232 | Include an unaltered copy of this License. | ||
233 | |||
234 | @item | ||
235 | Preserve the section Entitled ``History'', Preserve its Title, and add | ||
236 | to it an item stating at least the title, year, new authors, and | ||
237 | publisher of the Modified Version as given on the Title Page. If | ||
238 | there is no section Entitled ``History'' in the Document, create one | ||
239 | stating the title, year, authors, and publisher of the Document as | ||
240 | given on its Title Page, then add an item describing the Modified | ||
241 | Version as stated in the previous sentence. | ||
242 | |||
243 | @item | ||
244 | Preserve the network location, if any, given in the Document for | ||
245 | public access to a Transparent copy of the Document, and likewise | ||
246 | the network locations given in the Document for previous versions | ||
247 | it was based on. These may be placed in the ``History'' section. | ||
248 | You may omit a network location for a work that was published at | ||
249 | least four years before the Document itself, or if the original | ||
250 | publisher of the version it refers to gives permission. | ||
251 | |||
252 | @item | ||
253 | For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve | ||
254 | the Title of the section, and preserve in the section all the | ||
255 | substance and tone of each of the contributor acknowledgements and/or | ||
256 | dedications given therein. | ||
257 | |||
258 | @item | ||
259 | Preserve all the Invariant Sections of the Document, | ||
260 | unaltered in their text and in their titles. Section numbers | ||
261 | or the equivalent are not considered part of the section titles. | ||
262 | |||
263 | @item | ||
264 | Delete any section Entitled ``Endorsements''. Such a section | ||
265 | may not be included in the Modified Version. | ||
266 | |||
267 | @item | ||
268 | Do not retitle any existing section to be Entitled ``Endorsements'' or | ||
269 | to conflict in title with any Invariant Section. | ||
270 | |||
271 | @item | ||
272 | Preserve any Warranty Disclaimers. | ||
273 | @end enumerate | ||
274 | |||
275 | If the Modified Version includes new front-matter sections or | ||
276 | appendices that qualify as Secondary Sections and contain no material | ||
277 | copied from the Document, you may at your option designate some or all | ||
278 | of these sections as invariant. To do this, add their titles to the | ||
279 | list of Invariant Sections in the Modified Version's license notice. | ||
280 | These titles must be distinct from any other section titles. | ||
281 | |||
282 | You may add a section Entitled ``Endorsements'', provided it contains | ||
283 | nothing but endorsements of your Modified Version by various | ||
284 | parties---for example, statements of peer review or that the text has | ||
285 | been approved by an organization as the authoritative definition of a | ||
286 | standard. | ||
287 | |||
288 | You may add a passage of up to five words as a Front-Cover Text, and a | ||
289 | passage of up to 25 words as a Back-Cover Text, to the end of the list | ||
290 | of Cover Texts in the Modified Version. Only one passage of | ||
291 | Front-Cover Text and one of Back-Cover Text may be added by (or | ||
292 | through arrangements made by) any one entity. If the Document already | ||
293 | includes a cover text for the same cover, previously added by you or | ||
294 | by arrangement made by the same entity you are acting on behalf of, | ||
295 | you may not add another; but you may replace the old one, on explicit | ||
296 | permission from the previous publisher that added the old one. | ||
297 | |||
298 | The author(s) and publisher(s) of the Document do not by this License | ||
299 | give permission to use their names for publicity for or to assert or | ||
300 | imply endorsement of any Modified Version. | ||
301 | |||
302 | @item | ||
303 | COMBINING DOCUMENTS | ||
304 | |||
305 | You may combine the Document with other documents released under this | ||
306 | License, under the terms defined in section 4 above for modified | ||
307 | versions, provided that you include in the combination all of the | ||
308 | Invariant Sections of all of the original documents, unmodified, and | ||
309 | list them all as Invariant Sections of your combined work in its | ||
310 | license notice, and that you preserve all their Warranty Disclaimers. | ||
311 | |||
312 | The combined work need only contain one copy of this License, and | ||
313 | multiple identical Invariant Sections may be replaced with a single | ||
314 | copy. If there are multiple Invariant Sections with the same name but | ||
315 | different contents, make the title of each such section unique by | ||
316 | adding at the end of it, in parentheses, the name of the original | ||
317 | author or publisher of that section if known, or else a unique number. | ||
318 | Make the same adjustment to the section titles in the list of | ||
319 | Invariant Sections in the license notice of the combined work. | ||
320 | |||
321 | In the combination, you must combine any sections Entitled ``History'' | ||
322 | in the various original documents, forming one section Entitled | ||
323 | ``History''; likewise combine any sections Entitled ``Acknowledgements'', | ||
324 | and any sections Entitled ``Dedications''. You must delete all | ||
325 | sections Entitled ``Endorsements.'' | ||
326 | |||
327 | @item | ||
328 | COLLECTIONS OF DOCUMENTS | ||
329 | |||
330 | You may make a collection consisting of the Document and other documents | ||
331 | released under this License, and replace the individual copies of this | ||
332 | License in the various documents with a single copy that is included in | ||
333 | the collection, provided that you follow the rules of this License for | ||
334 | verbatim copying of each of the documents in all other respects. | ||
335 | |||
336 | You may extract a single document from such a collection, and distribute | ||
337 | it individually under this License, provided you insert a copy of this | ||
338 | License into the extracted document, and follow this License in all | ||
339 | other respects regarding verbatim copying of that document. | ||
340 | |||
341 | @item | ||
342 | AGGREGATION WITH INDEPENDENT WORKS | ||
343 | |||
344 | A compilation of the Document or its derivatives with other separate | ||
345 | and independent documents or works, in or on a volume of a storage or | ||
346 | distribution medium, is called an ``aggregate'' if the copyright | ||
347 | resulting from the compilation is not used to limit the legal rights | ||
348 | of the compilation's users beyond what the individual works permit. | ||
349 | When the Document is included in an aggregate, this License does not | ||
350 | apply to the other works in the aggregate which are not themselves | ||
351 | derivative works of the Document. | ||
352 | |||
353 | If the Cover Text requirement of section 3 is applicable to these | ||
354 | copies of the Document, then if the Document is less than one half of | ||
355 | the entire aggregate, the Document's Cover Texts may be placed on | ||
356 | covers that bracket the Document within the aggregate, or the | ||
357 | electronic equivalent of covers if the Document is in electronic form. | ||
358 | Otherwise they must appear on printed covers that bracket the whole | ||
359 | aggregate. | ||
360 | |||
361 | @item | ||
362 | TRANSLATION | ||
363 | |||
364 | Translation is considered a kind of modification, so you may | ||
365 | distribute translations of the Document under the terms of section 4. | ||
366 | Replacing Invariant Sections with translations requires special | ||
367 | permission from their copyright holders, but you may include | ||
368 | translations of some or all Invariant Sections in addition to the | ||
369 | original versions of these Invariant Sections. You may include a | ||
370 | translation of this License, and all the license notices in the | ||
371 | Document, and any Warranty Disclaimers, provided that you also include | ||
372 | the original English version of this License and the original versions | ||
373 | of those notices and disclaimers. In case of a disagreement between | ||
374 | the translation and the original version of this License or a notice | ||
375 | or disclaimer, the original version will prevail. | ||
376 | |||
377 | If a section in the Document is Entitled ``Acknowledgements'', | ||
378 | ``Dedications'', or ``History'', the requirement (section 4) to Preserve | ||
379 | its Title (section 1) will typically require changing the actual | ||
380 | title. | ||
381 | |||
382 | @item | ||
383 | TERMINATION | ||
384 | |||
385 | You may not copy, modify, sublicense, or distribute the Document | ||
386 | except as expressly provided under this License. Any attempt | ||
387 | otherwise to copy, modify, sublicense, or distribute it is void, and | ||
388 | will automatically terminate your rights under this License. | ||
389 | |||
390 | However, if you cease all violation of this License, then your license | ||
391 | from a particular copyright holder is reinstated (a) provisionally, | ||
392 | unless and until the copyright holder explicitly and finally | ||
393 | terminates your license, and (b) permanently, if the copyright holder | ||
394 | fails to notify you of the violation by some reasonable means prior to | ||
395 | 60 days after the cessation. | ||
396 | |||
397 | Moreover, your license from a particular copyright holder is | ||
398 | reinstated permanently if the copyright holder notifies you of the | ||
399 | violation by some reasonable means, this is the first time you have | ||
400 | received notice of violation of this License (for any work) from that | ||
401 | copyright holder, and you cure the violation prior to 30 days after | ||
402 | your receipt of the notice. | ||
403 | |||
404 | Termination of your rights under this section does not terminate the | ||
405 | licenses of parties who have received copies or rights from you under | ||
406 | this License. If your rights have been terminated and not permanently | ||
407 | reinstated, receipt of a copy of some or all of the same material does | ||
408 | not give you any rights to use it. | ||
409 | |||
410 | @item | ||
411 | FUTURE REVISIONS OF THIS LICENSE | ||
412 | |||
413 | The Free Software Foundation may publish new, revised versions | ||
414 | of the GNU Free Documentation License from time to time. Such new | ||
415 | versions will be similar in spirit to the present version, but may | ||
416 | differ in detail to address new problems or concerns. See | ||
417 | @uref{http://www.gnu.org/copyleft/}. | ||
418 | |||
419 | Each version of the License is given a distinguishing version number. | ||
420 | If the Document specifies that a particular numbered version of this | ||
421 | License ``or any later version'' applies to it, you have the option of | ||
422 | following the terms and conditions either of that specified version or | ||
423 | of any later version that has been published (not as a draft) by the | ||
424 | Free Software Foundation. If the Document does not specify a version | ||
425 | number of this License, you may choose any version ever published (not | ||
426 | as a draft) by the Free Software Foundation. If the Document | ||
427 | specifies that a proxy can decide which future versions of this | ||
428 | License can be used, that proxy's public statement of acceptance of a | ||
429 | version permanently authorizes you to choose that version for the | ||
430 | Document. | ||
431 | |||
432 | @item | ||
433 | RELICENSING | ||
434 | |||
435 | ``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any | ||
436 | World Wide Web server that publishes copyrightable works and also | ||
437 | provides prominent facilities for anybody to edit those works. A | ||
438 | public wiki that anybody can edit is an example of such a server. A | ||
439 | ``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the | ||
440 | site means any set of copyrightable works thus published on the MMC | ||
441 | site. | ||
442 | |||
443 | ``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0 | ||
444 | license published by Creative Commons Corporation, a not-for-profit | ||
445 | corporation with a principal place of business in San Francisco, | ||
446 | California, as well as future copyleft versions of that license | ||
447 | published by that same organization. | ||
448 | |||
449 | ``Incorporate'' means to publish or republish a Document, in whole or | ||
450 | in part, as part of another Document. | ||
451 | |||
452 | An MMC is ``eligible for relicensing'' if it is licensed under this | ||
453 | License, and if all works that were first published under this License | ||
454 | somewhere other than this MMC, and subsequently incorporated in whole | ||
455 | or in part into the MMC, (1) had no cover texts or invariant sections, | ||
456 | and (2) were thus incorporated prior to November 1, 2008. | ||
457 | |||
458 | The operator of an MMC Site may republish an MMC contained in the site | ||
459 | under CC-BY-SA on the same site at any time before August 1, 2009, | ||
460 | provided the MMC is eligible for relicensing. | ||
461 | |||
462 | @end enumerate | ||
463 | |||
464 | @page | ||
465 | @heading ADDENDUM: How to use this License for your documents | ||
466 | |||
467 | To use this License in a document you have written, include a copy of | ||
468 | the License in the document and put the following copyright and | ||
469 | license notices just after the title page: | ||
470 | |||
471 | @smallexample | ||
472 | @group | ||
473 | Copyright (C) @var{year} @var{your name}. | ||
474 | Permission is granted to copy, distribute and/or modify this document | ||
475 | under the terms of the GNU Free Documentation License, Version 1.3 | ||
476 | or any later version published by the Free Software Foundation; | ||
477 | with no Invariant Sections, no Front-Cover Texts, and no Back-Cover | ||
478 | Texts. A copy of the license is included in the section entitled ``GNU | ||
479 | Free Documentation License''. | ||
480 | @end group | ||
481 | @end smallexample | ||
482 | |||
483 | If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, | ||
484 | replace the ``with@dots{}Texts.''@: line with this: | ||
485 | |||
486 | @smallexample | ||
487 | @group | ||
488 | with the Invariant Sections being @var{list their titles}, with | ||
489 | the Front-Cover Texts being @var{list}, and with the Back-Cover Texts | ||
490 | being @var{list}. | ||
491 | @end group | ||
492 | @end smallexample | ||
493 | |||
494 | If you have Invariant Sections without Cover Texts, or some other | ||
495 | combination of the three, merge those two alternatives to suit the | ||
496 | situation. | ||
497 | |||
498 | If your document contains nontrivial examples of program code, we | ||
499 | recommend releasing these examples in parallel under your choice of | ||
500 | free software license, such as the GNU General Public License, | ||
501 | to permit their use in free software. | ||
502 | |||
503 | @c Local Variables: | ||
504 | @c ispell-local-pdict: "ispell-dict" | ||
505 | @c End: | ||
diff --git a/doc/old/tutorial/gpl-3.0.texi b/doc/old/tutorial/gpl-3.0.texi new file mode 100644 index 000000000..0e2e212ac --- /dev/null +++ b/doc/old/tutorial/gpl-3.0.texi | |||
@@ -0,0 +1,717 @@ | |||
1 | @c The GNU General Public License. | ||
2 | @center Version 3, 29 June 2007 | ||
3 | |||
4 | @c This file is intended to be included within another document, | ||
5 | @c hence no sectioning command or @node. | ||
6 | |||
7 | @display | ||
8 | Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/} | ||
9 | |||
10 | Everyone is permitted to copy and distribute verbatim copies of this | ||
11 | license document, but changing it is not allowed. | ||
12 | @end display | ||
13 | |||
14 | @heading Preamble | ||
15 | |||
16 | The GNU General Public License is a free, copyleft license for | ||
17 | software and other kinds of works. | ||
18 | |||
19 | The licenses for most software and other practical works are designed | ||
20 | to take away your freedom to share and change the works. By contrast, | ||
21 | the GNU General Public License is intended to guarantee your freedom | ||
22 | to share and change all versions of a program---to make sure it remains | ||
23 | free software for all its users. We, the Free Software Foundation, | ||
24 | use the GNU General Public License for most of our software; it | ||
25 | applies also to any other work released this way by its authors. You | ||
26 | can apply it to your programs, too. | ||
27 | |||
28 | When we speak of free software, we are referring to freedom, not | ||
29 | price. Our General Public Licenses are designed to make sure that you | ||
30 | have the freedom to distribute copies of free software (and charge for | ||
31 | them if you wish), that you receive source code or can get it if you | ||
32 | want it, that you can change the software or use pieces of it in new | ||
33 | free programs, and that you know you can do these things. | ||
34 | |||
35 | To protect your rights, we need to prevent others from denying you | ||
36 | these rights or asking you to surrender the rights. Therefore, you | ||
37 | have certain responsibilities if you distribute copies of the | ||
38 | software, or if you modify it: responsibilities to respect the freedom | ||
39 | of others. | ||
40 | |||
41 | For example, if you distribute copies of such a program, whether | ||
42 | gratis or for a fee, you must pass on to the recipients the same | ||
43 | freedoms that you received. You must make sure that they, too, | ||
44 | receive or can get the source code. And you must show them these | ||
45 | terms so they know their rights. | ||
46 | |||
47 | Developers that use the GNU GPL protect your rights with two steps: | ||
48 | (1) assert copyright on the software, and (2) offer you this License | ||
49 | giving you legal permission to copy, distribute and/or modify it. | ||
50 | |||
51 | For the developers' and authors' protection, the GPL clearly explains | ||
52 | that there is no warranty for this free software. For both users' and | ||
53 | authors' sake, the GPL requires that modified versions be marked as | ||
54 | changed, so that their problems will not be attributed erroneously to | ||
55 | authors of previous versions. | ||
56 | |||
57 | Some devices are designed to deny users access to install or run | ||
58 | modified versions of the software inside them, although the | ||
59 | manufacturer can do so. This is fundamentally incompatible with the | ||
60 | aim of protecting users' freedom to change the software. The | ||
61 | systematic pattern of such abuse occurs in the area of products for | ||
62 | individuals to use, which is precisely where it is most unacceptable. | ||
63 | Therefore, we have designed this version of the GPL to prohibit the | ||
64 | practice for those products. If such problems arise substantially in | ||
65 | other domains, we stand ready to extend this provision to those | ||
66 | domains in future versions of the GPL, as needed to protect the | ||
67 | freedom of users. | ||
68 | |||
69 | Finally, every program is threatened constantly by software patents. | ||
70 | States should not allow patents to restrict development and use of | ||
71 | software on general-purpose computers, but in those that do, we wish | ||
72 | to avoid the special danger that patents applied to a free program | ||
73 | could make it effectively proprietary. To prevent this, the GPL | ||
74 | assures that patents cannot be used to render the program non-free. | ||
75 | |||
76 | The precise terms and conditions for copying, distribution and | ||
77 | modification follow. | ||
78 | |||
79 | @heading TERMS AND CONDITIONS | ||
80 | |||
81 | @enumerate 0 | ||
82 | @item Definitions. | ||
83 | |||
84 | ``This License'' refers to version 3 of the GNU General Public License. | ||
85 | |||
86 | ``Copyright'' also means copyright-like laws that apply to other kinds | ||
87 | of works, such as semiconductor masks. | ||
88 | |||
89 | ``The Program'' refers to any copyrightable work licensed under this | ||
90 | License. Each licensee is addressed as ``you''. ``Licensees'' and | ||
91 | ``recipients'' may be individuals or organizations. | ||
92 | |||
93 | To ``modify'' a work means to copy from or adapt all or part of the work | ||
94 | in a fashion requiring copyright permission, other than the making of | ||
95 | an exact copy. The resulting work is called a ``modified version'' of | ||
96 | the earlier work or a work ``based on'' the earlier work. | ||
97 | |||
98 | A ``covered work'' means either the unmodified Program or a work based | ||
99 | on the Program. | ||
100 | |||
101 | To ``propagate'' a work means to do anything with it that, without | ||
102 | permission, would make you directly or secondarily liable for | ||
103 | infringement under applicable copyright law, except executing it on a | ||
104 | computer or modifying a private copy. Propagation includes copying, | ||
105 | distribution (with or without modification), making available to the | ||
106 | public, and in some countries other activities as well. | ||
107 | |||
108 | To ``convey'' a work means any kind of propagation that enables other | ||
109 | parties to make or receive copies. Mere interaction with a user | ||
110 | through a computer network, with no transfer of a copy, is not | ||
111 | conveying. | ||
112 | |||
113 | An interactive user interface displays ``Appropriate Legal Notices'' to | ||
114 | the extent that it includes a convenient and prominently visible | ||
115 | feature that (1) displays an appropriate copyright notice, and (2) | ||
116 | tells the user that there is no warranty for the work (except to the | ||
117 | extent that warranties are provided), that licensees may convey the | ||
118 | work under this License, and how to view a copy of this License. If | ||
119 | the interface presents a list of user commands or options, such as a | ||
120 | menu, a prominent item in the list meets this criterion. | ||
121 | |||
122 | @item Source Code. | ||
123 | |||
124 | The ``source code'' for a work means the preferred form of the work for | ||
125 | making modifications to it. ``Object code'' means any non-source form | ||
126 | of a work. | ||
127 | |||
128 | A ``Standard Interface'' means an interface that either is an official | ||
129 | standard defined by a recognized standards body, or, in the case of | ||
130 | interfaces specified for a particular programming language, one that | ||
131 | is widely used among developers working in that language. | ||
132 | |||
133 | The ``System Libraries'' of an executable work include anything, other | ||
134 | than the work as a whole, that (a) is included in the normal form of | ||
135 | packaging a Major Component, but which is not part of that Major | ||
136 | Component, and (b) serves only to enable use of the work with that | ||
137 | Major Component, or to implement a Standard Interface for which an | ||
138 | implementation is available to the public in source code form. A | ||
139 | ``Major Component'', in this context, means a major essential component | ||
140 | (kernel, window system, and so on) of the specific operating system | ||
141 | (if any) on which the executable work runs, or a compiler used to | ||
142 | produce the work, or an object code interpreter used to run it. | ||
143 | |||
144 | The ``Corresponding Source'' for a work in object code form means all | ||
145 | the source code needed to generate, install, and (for an executable | ||
146 | work) run the object code and to modify the work, including scripts to | ||
147 | control those activities. However, it does not include the work's | ||
148 | System Libraries, or general-purpose tools or generally available free | ||
149 | programs which are used unmodified in performing those activities but | ||
150 | which are not part of the work. For example, Corresponding Source | ||
151 | includes interface definition files associated with source files for | ||
152 | the work, and the source code for shared libraries and dynamically | ||
153 | linked subprograms that the work is specifically designed to require, | ||
154 | such as by intimate data communication or control flow between those | ||
155 | subprograms and other parts of the work. | ||
156 | |||
157 | The Corresponding Source need not include anything that users can | ||
158 | regenerate automatically from other parts of the Corresponding Source. | ||
159 | |||
160 | The Corresponding Source for a work in source code form is that same | ||
161 | work. | ||
162 | |||
163 | @item Basic Permissions. | ||
164 | |||
165 | All rights granted under this License are granted for the term of | ||
166 | copyright on the Program, and are irrevocable provided the stated | ||
167 | conditions are met. This License explicitly affirms your unlimited | ||
168 | permission to run the unmodified Program. The output from running a | ||
169 | covered work is covered by this License only if the output, given its | ||
170 | content, constitutes a covered work. This License acknowledges your | ||
171 | rights of fair use or other equivalent, as provided by copyright law. | ||
172 | |||
173 | You may make, run and propagate covered works that you do not convey, | ||
174 | without conditions so long as your license otherwise remains in force. | ||
175 | You may convey covered works to others for the sole purpose of having | ||
176 | them make modifications exclusively for you, or provide you with | ||
177 | facilities for running those works, provided that you comply with the | ||
178 | terms of this License in conveying all material for which you do not | ||
179 | control copyright. Those thus making or running the covered works for | ||
180 | you must do so exclusively on your behalf, under your direction and | ||
181 | control, on terms that prohibit them from making any copies of your | ||
182 | copyrighted material outside their relationship with you. | ||
183 | |||
184 | Conveying under any other circumstances is permitted solely under the | ||
185 | conditions stated below. Sublicensing is not allowed; section 10 | ||
186 | makes it unnecessary. | ||
187 | |||
188 | @item Protecting Users' Legal Rights From Anti-Circumvention Law. | ||
189 | |||
190 | No covered work shall be deemed part of an effective technological | ||
191 | measure under any applicable law fulfilling obligations under article | ||
192 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or | ||
193 | similar laws prohibiting or restricting circumvention of such | ||
194 | measures. | ||
195 | |||
196 | When you convey a covered work, you waive any legal power to forbid | ||
197 | circumvention of technological measures to the extent such | ||
198 | circumvention is effected by exercising rights under this License with | ||
199 | respect to the covered work, and you disclaim any intention to limit | ||
200 | operation or modification of the work as a means of enforcing, against | ||
201 | the work's users, your or third parties' legal rights to forbid | ||
202 | circumvention of technological measures. | ||
203 | |||
204 | @item Conveying Verbatim Copies. | ||
205 | |||
206 | You may convey verbatim copies of the Program's source code as you | ||
207 | receive it, in any medium, provided that you conspicuously and | ||
208 | appropriately publish on each copy an appropriate copyright notice; | ||
209 | keep intact all notices stating that this License and any | ||
210 | non-permissive terms added in accord with section 7 apply to the code; | ||
211 | keep intact all notices of the absence of any warranty; and give all | ||
212 | recipients a copy of this License along with the Program. | ||
213 | |||
214 | You may charge any price or no price for each copy that you convey, | ||
215 | and you may offer support or warranty protection for a fee. | ||
216 | |||
217 | @item Conveying Modified Source Versions. | ||
218 | |||
219 | You may convey a work based on the Program, or the modifications to | ||
220 | produce it from the Program, in the form of source code under the | ||
221 | terms of section 4, provided that you also meet all of these | ||
222 | conditions: | ||
223 | |||
224 | @enumerate a | ||
225 | @item | ||
226 | The work must carry prominent notices stating that you modified it, | ||
227 | and giving a relevant date. | ||
228 | |||
229 | @item | ||
230 | The work must carry prominent notices stating that it is released | ||
231 | under this License and any conditions added under section 7. This | ||
232 | requirement modifies the requirement in section 4 to ``keep intact all | ||
233 | notices''. | ||
234 | |||
235 | @item | ||
236 | You must license the entire work, as a whole, under this License to | ||
237 | anyone who comes into possession of a copy. This License will | ||
238 | therefore apply, along with any applicable section 7 additional terms, | ||
239 | to the whole of the work, and all its parts, regardless of how they | ||
240 | are packaged. This License gives no permission to license the work in | ||
241 | any other way, but it does not invalidate such permission if you have | ||
242 | separately received it. | ||
243 | |||
244 | @item | ||
245 | If the work has interactive user interfaces, each must display | ||
246 | Appropriate Legal Notices; however, if the Program has interactive | ||
247 | interfaces that do not display Appropriate Legal Notices, your work | ||
248 | need not make them do so. | ||
249 | @end enumerate | ||
250 | |||
251 | A compilation of a covered work with other separate and independent | ||
252 | works, which are not by their nature extensions of the covered work, | ||
253 | and which are not combined with it such as to form a larger program, | ||
254 | in or on a volume of a storage or distribution medium, is called an | ||
255 | ``aggregate'' if the compilation and its resulting copyright are not | ||
256 | used to limit the access or legal rights of the compilation's users | ||
257 | beyond what the individual works permit. Inclusion of a covered work | ||
258 | in an aggregate does not cause this License to apply to the other | ||
259 | parts of the aggregate. | ||
260 | |||
261 | @item Conveying Non-Source Forms. | ||
262 | |||
263 | You may convey a covered work in object code form under the terms of | ||
264 | sections 4 and 5, provided that you also convey the machine-readable | ||
265 | Corresponding Source under the terms of this License, in one of these | ||
266 | ways: | ||
267 | |||
268 | @enumerate a | ||
269 | @item | ||
270 | Convey the object code in, or embodied in, a physical product | ||
271 | (including a physical distribution medium), accompanied by the | ||
272 | Corresponding Source fixed on a durable physical medium customarily | ||
273 | used for software interchange. | ||
274 | |||
275 | @item | ||
276 | Convey the object code in, or embodied in, a physical product | ||
277 | (including a physical distribution medium), accompanied by a written | ||
278 | offer, valid for at least three years and valid for as long as you | ||
279 | offer spare parts or customer support for that product model, to give | ||
280 | anyone who possesses the object code either (1) a copy of the | ||
281 | Corresponding Source for all the software in the product that is | ||
282 | covered by this License, on a durable physical medium customarily used | ||
283 | for software interchange, for a price no more than your reasonable | ||
284 | cost of physically performing this conveying of source, or (2) access | ||
285 | to copy the Corresponding Source from a network server at no charge. | ||
286 | |||
287 | @item | ||
288 | Convey individual copies of the object code with a copy of the written | ||
289 | offer to provide the Corresponding Source. This alternative is | ||
290 | allowed only occasionally and noncommercially, and only if you | ||
291 | received the object code with such an offer, in accord with subsection | ||
292 | 6b. | ||
293 | |||
294 | @item | ||
295 | Convey the object code by offering access from a designated place | ||
296 | (gratis or for a charge), and offer equivalent access to the | ||
297 | Corresponding Source in the same way through the same place at no | ||
298 | further charge. You need not require recipients to copy the | ||
299 | Corresponding Source along with the object code. If the place to copy | ||
300 | the object code is a network server, the Corresponding Source may be | ||
301 | on a different server (operated by you or a third party) that supports | ||
302 | equivalent copying facilities, provided you maintain clear directions | ||
303 | next to the object code saying where to find the Corresponding Source. | ||
304 | Regardless of what server hosts the Corresponding Source, you remain | ||
305 | obligated to ensure that it is available for as long as needed to | ||
306 | satisfy these requirements. | ||
307 | |||
308 | @item | ||
309 | Convey the object code using peer-to-peer transmission, provided you | ||
310 | inform other peers where the object code and Corresponding Source of | ||
311 | the work are being offered to the general public at no charge under | ||
312 | subsection 6d. | ||
313 | |||
314 | @end enumerate | ||
315 | |||
316 | A separable portion of the object code, whose source code is excluded | ||
317 | from the Corresponding Source as a System Library, need not be | ||
318 | included in conveying the object code work. | ||
319 | |||
320 | A ``User Product'' is either (1) a ``consumer product'', which means any | ||
321 | tangible personal property which is normally used for personal, | ||
322 | family, or household purposes, or (2) anything designed or sold for | ||
323 | incorporation into a dwelling. In determining whether a product is a | ||
324 | consumer product, doubtful cases shall be resolved in favor of | ||
325 | coverage. For a particular product received by a particular user, | ||
326 | ``normally used'' refers to a typical or common use of that class of | ||
327 | product, regardless of the status of the particular user or of the way | ||
328 | in which the particular user actually uses, or expects or is expected | ||
329 | to use, the product. A product is a consumer product regardless of | ||
330 | whether the product has substantial commercial, industrial or | ||
331 | non-consumer uses, unless such uses represent the only significant | ||
332 | mode of use of the product. | ||
333 | |||
334 | ``Installation Information'' for a User Product means any methods, | ||
335 | procedures, authorization keys, or other information required to | ||
336 | install and execute modified versions of a covered work in that User | ||
337 | Product from a modified version of its Corresponding Source. The | ||
338 | information must suffice to ensure that the continued functioning of | ||
339 | the modified object code is in no case prevented or interfered with | ||
340 | solely because modification has been made. | ||
341 | |||
342 | If you convey an object code work under this section in, or with, or | ||
343 | specifically for use in, a User Product, and the conveying occurs as | ||
344 | part of a transaction in which the right of possession and use of the | ||
345 | User Product is transferred to the recipient in perpetuity or for a | ||
346 | fixed term (regardless of how the transaction is characterized), the | ||
347 | Corresponding Source conveyed under this section must be accompanied | ||
348 | by the Installation Information. But this requirement does not apply | ||
349 | if neither you nor any third party retains the ability to install | ||
350 | modified object code on the User Product (for example, the work has | ||
351 | been installed in ROM). | ||
352 | |||
353 | The requirement to provide Installation Information does not include a | ||
354 | requirement to continue to provide support service, warranty, or | ||
355 | updates for a work that has been modified or installed by the | ||
356 | recipient, or for the User Product in which it has been modified or | ||
357 | installed. Access to a network may be denied when the modification | ||
358 | itself materially and adversely affects the operation of the network | ||
359 | or violates the rules and protocols for communication across the | ||
360 | network. | ||
361 | |||
362 | Corresponding Source conveyed, and Installation Information provided, | ||
363 | in accord with this section must be in a format that is publicly | ||
364 | documented (and with an implementation available to the public in | ||
365 | source code form), and must require no special password or key for | ||
366 | unpacking, reading or copying. | ||
367 | |||
368 | @item Additional Terms. | ||
369 | |||
370 | ``Additional permissions'' are terms that supplement the terms of this | ||
371 | License by making exceptions from one or more of its conditions. | ||
372 | Additional permissions that are applicable to the entire Program shall | ||
373 | be treated as though they were included in this License, to the extent | ||
374 | that they are valid under applicable law. If additional permissions | ||
375 | apply only to part of the Program, that part may be used separately | ||
376 | under those permissions, but the entire Program remains governed by | ||
377 | this License without regard to the additional permissions. | ||
378 | |||
379 | When you convey a copy of a covered work, you may at your option | ||
380 | remove any additional permissions from that copy, or from any part of | ||
381 | it. (Additional permissions may be written to require their own | ||
382 | removal in certain cases when you modify the work.) You may place | ||
383 | additional permissions on material, added by you to a covered work, | ||
384 | for which you have or can give appropriate copyright permission. | ||
385 | |||
386 | Notwithstanding any other provision of this License, for material you | ||
387 | add to a covered work, you may (if authorized by the copyright holders | ||
388 | of that material) supplement the terms of this License with terms: | ||
389 | |||
390 | @enumerate a | ||
391 | @item | ||
392 | Disclaiming warranty or limiting liability differently from the terms | ||
393 | of sections 15 and 16 of this License; or | ||
394 | |||
395 | @item | ||
396 | Requiring preservation of specified reasonable legal notices or author | ||
397 | attributions in that material or in the Appropriate Legal Notices | ||
398 | displayed by works containing it; or | ||
399 | |||
400 | @item | ||
401 | Prohibiting misrepresentation of the origin of that material, or | ||
402 | requiring that modified versions of such material be marked in | ||
403 | reasonable ways as different from the original version; or | ||
404 | |||
405 | @item | ||
406 | Limiting the use for publicity purposes of names of licensors or | ||
407 | authors of the material; or | ||
408 | |||
409 | @item | ||
410 | Declining to grant rights under trademark law for use of some trade | ||
411 | names, trademarks, or service marks; or | ||
412 | |||
413 | @item | ||
414 | Requiring indemnification of licensors and authors of that material by | ||
415 | anyone who conveys the material (or modified versions of it) with | ||
416 | contractual assumptions of liability to the recipient, for any | ||
417 | liability that these contractual assumptions directly impose on those | ||
418 | licensors and authors. | ||
419 | @end enumerate | ||
420 | |||
421 | All other non-permissive additional terms are considered ``further | ||
422 | restrictions'' within the meaning of section 10. If the Program as you | ||
423 | received it, or any part of it, contains a notice stating that it is | ||
424 | governed by this License along with a term that is a further | ||
425 | restriction, you may remove that term. If a license document contains | ||
426 | a further restriction but permits relicensing or conveying under this | ||
427 | License, you may add to a covered work material governed by the terms | ||
428 | of that license document, provided that the further restriction does | ||
429 | not survive such relicensing or conveying. | ||
430 | |||
431 | If you add terms to a covered work in accord with this section, you | ||
432 | must place, in the relevant source files, a statement of the | ||
433 | additional terms that apply to those files, or a notice indicating | ||
434 | where to find the applicable terms. | ||
435 | |||
436 | Additional terms, permissive or non-permissive, may be stated in the | ||
437 | form of a separately written license, or stated as exceptions; the | ||
438 | above requirements apply either way. | ||
439 | |||
440 | @item Termination. | ||
441 | |||
442 | You may not propagate or modify a covered work except as expressly | ||
443 | provided under this License. Any attempt otherwise to propagate or | ||
444 | modify it is void, and will automatically terminate your rights under | ||
445 | this License (including any patent licenses granted under the third | ||
446 | paragraph of section 11). | ||
447 | |||
448 | However, if you cease all violation of this License, then your license | ||
449 | from a particular copyright holder is reinstated (a) provisionally, | ||
450 | unless and until the copyright holder explicitly and finally | ||
451 | terminates your license, and (b) permanently, if the copyright holder | ||
452 | fails to notify you of the violation by some reasonable means prior to | ||
453 | 60 days after the cessation. | ||
454 | |||
455 | Moreover, your license from a particular copyright holder is | ||
456 | reinstated permanently if the copyright holder notifies you of the | ||
457 | violation by some reasonable means, this is the first time you have | ||
458 | received notice of violation of this License (for any work) from that | ||
459 | copyright holder, and you cure the violation prior to 30 days after | ||
460 | your receipt of the notice. | ||
461 | |||
462 | Termination of your rights under this section does not terminate the | ||
463 | licenses of parties who have received copies or rights from you under | ||
464 | this License. If your rights have been terminated and not permanently | ||
465 | reinstated, you do not qualify to receive new licenses for the same | ||
466 | material under section 10. | ||
467 | |||
468 | @item Acceptance Not Required for Having Copies. | ||
469 | |||
470 | You are not required to accept this License in order to receive or run | ||
471 | a copy of the Program. Ancillary propagation of a covered work | ||
472 | occurring solely as a consequence of using peer-to-peer transmission | ||
473 | to receive a copy likewise does not require acceptance. However, | ||
474 | nothing other than this License grants you permission to propagate or | ||
475 | modify any covered work. These actions infringe copyright if you do | ||
476 | not accept this License. Therefore, by modifying or propagating a | ||
477 | covered work, you indicate your acceptance of this License to do so. | ||
478 | |||
479 | @item Automatic Licensing of Downstream Recipients. | ||
480 | |||
481 | Each time you convey a covered work, the recipient automatically | ||
482 | receives a license from the original licensors, to run, modify and | ||
483 | propagate that work, subject to this License. You are not responsible | ||
484 | for enforcing compliance by third parties with this License. | ||
485 | |||
486 | An ``entity transaction'' is a transaction transferring control of an | ||
487 | organization, or substantially all assets of one, or subdividing an | ||
488 | organization, or merging organizations. If propagation of a covered | ||
489 | work results from an entity transaction, each party to that | ||
490 | transaction who receives a copy of the work also receives whatever | ||
491 | licenses to the work the party's predecessor in interest had or could | ||
492 | give under the previous paragraph, plus a right to possession of the | ||
493 | Corresponding Source of the work from the predecessor in interest, if | ||
494 | the predecessor has it or can get it with reasonable efforts. | ||
495 | |||
496 | You may not impose any further restrictions on the exercise of the | ||
497 | rights granted or affirmed under this License. For example, you may | ||
498 | not impose a license fee, royalty, or other charge for exercise of | ||
499 | rights granted under this License, and you may not initiate litigation | ||
500 | (including a cross-claim or counterclaim in a lawsuit) alleging that | ||
501 | any patent claim is infringed by making, using, selling, offering for | ||
502 | sale, or importing the Program or any portion of it. | ||
503 | |||
504 | @item Patents. | ||
505 | |||
506 | A ``contributor'' is a copyright holder who authorizes use under this | ||
507 | License of the Program or a work on which the Program is based. The | ||
508 | work thus licensed is called the contributor's ``contributor version''. | ||
509 | |||
510 | A contributor's ``essential patent claims'' are all patent claims owned | ||
511 | or controlled by the contributor, whether already acquired or | ||
512 | hereafter acquired, that would be infringed by some manner, permitted | ||
513 | by this License, of making, using, or selling its contributor version, | ||
514 | but do not include claims that would be infringed only as a | ||
515 | consequence of further modification of the contributor version. For | ||
516 | purposes of this definition, ``control'' includes the right to grant | ||
517 | patent sublicenses in a manner consistent with the requirements of | ||
518 | this License. | ||
519 | |||
520 | Each contributor grants you a non-exclusive, worldwide, royalty-free | ||
521 | patent license under the contributor's essential patent claims, to | ||
522 | make, use, sell, offer for sale, import and otherwise run, modify and | ||
523 | propagate the contents of its contributor version. | ||
524 | |||
525 | In the following three paragraphs, a ``patent license'' is any express | ||
526 | agreement or commitment, however denominated, not to enforce a patent | ||
527 | (such as an express permission to practice a patent or covenant not to | ||
528 | sue for patent infringement). To ``grant'' such a patent license to a | ||
529 | party means to make such an agreement or commitment not to enforce a | ||
530 | patent against the party. | ||
531 | |||
532 | If you convey a covered work, knowingly relying on a patent license, | ||
533 | and the Corresponding Source of the work is not available for anyone | ||
534 | to copy, free of charge and under the terms of this License, through a | ||
535 | publicly available network server or other readily accessible means, | ||
536 | then you must either (1) cause the Corresponding Source to be so | ||
537 | available, or (2) arrange to deprive yourself of the benefit of the | ||
538 | patent license for this particular work, or (3) arrange, in a manner | ||
539 | consistent with the requirements of this License, to extend the patent | ||
540 | license to downstream recipients. ``Knowingly relying'' means you have | ||
541 | actual knowledge that, but for the patent license, your conveying the | ||
542 | covered work in a country, or your recipient's use of the covered work | ||
543 | in a country, would infringe one or more identifiable patents in that | ||
544 | country that you have reason to believe are valid. | ||
545 | |||
546 | If, pursuant to or in connection with a single transaction or | ||
547 | arrangement, you convey, or propagate by procuring conveyance of, a | ||
548 | covered work, and grant a patent license to some of the parties | ||
549 | receiving the covered work authorizing them to use, propagate, modify | ||
550 | or convey a specific copy of the covered work, then the patent license | ||
551 | you grant is automatically extended to all recipients of the covered | ||
552 | work and works based on it. | ||
553 | |||
554 | A patent license is ``discriminatory'' if it does not include within the | ||
555 | scope of its coverage, prohibits the exercise of, or is conditioned on | ||
556 | the non-exercise of one or more of the rights that are specifically | ||
557 | granted under this License. You may not convey a covered work if you | ||
558 | are a party to an arrangement with a third party that is in the | ||
559 | business of distributing software, under which you make payment to the | ||
560 | third party based on the extent of your activity of conveying the | ||
561 | work, and under which the third party grants, to any of the parties | ||
562 | who would receive the covered work from you, a discriminatory patent | ||
563 | license (a) in connection with copies of the covered work conveyed by | ||
564 | you (or copies made from those copies), or (b) primarily for and in | ||
565 | connection with specific products or compilations that contain the | ||
566 | covered work, unless you entered into that arrangement, or that patent | ||
567 | license was granted, prior to 28 March 2007. | ||
568 | |||
569 | Nothing in this License shall be construed as excluding or limiting | ||
570 | any implied license or other defenses to infringement that may | ||
571 | otherwise be available to you under applicable patent law. | ||
572 | |||
573 | @item No Surrender of Others' Freedom. | ||
574 | |||
575 | If conditions are imposed on you (whether by court order, agreement or | ||
576 | otherwise) that contradict the conditions of this License, they do not | ||
577 | excuse you from the conditions of this License. If you cannot convey | ||
578 | a covered work so as to satisfy simultaneously your obligations under | ||
579 | this License and any other pertinent obligations, then as a | ||
580 | consequence you may not convey it at all. For example, if you agree | ||
581 | to terms that obligate you to collect a royalty for further conveying | ||
582 | from those to whom you convey the Program, the only way you could | ||
583 | satisfy both those terms and this License would be to refrain entirely | ||
584 | from conveying the Program. | ||
585 | |||
586 | @item Use with the GNU Affero General Public License. | ||
587 | |||
588 | Notwithstanding any other provision of this License, you have | ||
589 | permission to link or combine any covered work with a work licensed | ||
590 | under version 3 of the GNU Affero General Public License into a single | ||
591 | combined work, and to convey the resulting work. The terms of this | ||
592 | License will continue to apply to the part which is the covered work, | ||
593 | but the special requirements of the GNU Affero General Public License, | ||
594 | section 13, concerning interaction through a network will apply to the | ||
595 | combination as such. | ||
596 | |||
597 | @item Revised Versions of this License. | ||
598 | |||
599 | The Free Software Foundation may publish revised and/or new versions | ||
600 | of the GNU General Public License from time to time. Such new | ||
601 | versions will be similar in spirit to the present version, but may | ||
602 | differ in detail to address new problems or concerns. | ||
603 | |||
604 | Each version is given a distinguishing version number. If the Program | ||
605 | specifies that a certain numbered version of the GNU General Public | ||
606 | License ``or any later version'' applies to it, you have the option of | ||
607 | following the terms and conditions either of that numbered version or | ||
608 | of any later version published by the Free Software Foundation. If | ||
609 | the Program does not specify a version number of the GNU General | ||
610 | Public License, you may choose any version ever published by the Free | ||
611 | Software Foundation. | ||
612 | |||
613 | If the Program specifies that a proxy can decide which future versions | ||
614 | of the GNU General Public License can be used, that proxy's public | ||
615 | statement of acceptance of a version permanently authorizes you to | ||
616 | choose that version for the Program. | ||
617 | |||
618 | Later license versions may give you additional or different | ||
619 | permissions. However, no additional obligations are imposed on any | ||
620 | author or copyright holder as a result of your choosing to follow a | ||
621 | later version. | ||
622 | |||
623 | @item Disclaimer of Warranty. | ||
624 | |||
625 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY | ||
626 | APPLICABLE LAW@. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT | ||
627 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT | ||
628 | WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT | ||
629 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
630 | A PARTICULAR PURPOSE@. THE ENTIRE RISK AS TO THE QUALITY AND | ||
631 | PERFORMANCE OF THE PROGRAM IS WITH YOU@. SHOULD THE PROGRAM PROVE | ||
632 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR | ||
633 | CORRECTION. | ||
634 | |||
635 | @item Limitation of Liability. | ||
636 | |||
637 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING | ||
638 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR | ||
639 | CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, | ||
640 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES | ||
641 | ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT | ||
642 | NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR | ||
643 | LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM | ||
644 | TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER | ||
645 | PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. | ||
646 | |||
647 | @item Interpretation of Sections 15 and 16. | ||
648 | |||
649 | If the disclaimer of warranty and limitation of liability provided | ||
650 | above cannot be given local legal effect according to their terms, | ||
651 | reviewing courts shall apply local law that most closely approximates | ||
652 | an absolute waiver of all civil liability in connection with the | ||
653 | Program, unless a warranty or assumption of liability accompanies a | ||
654 | copy of the Program in return for a fee. | ||
655 | |||
656 | @end enumerate | ||
657 | |||
658 | @heading END OF TERMS AND CONDITIONS | ||
659 | |||
660 | @heading How to Apply These Terms to Your New Programs | ||
661 | |||
662 | If you develop a new program, and you want it to be of the greatest | ||
663 | possible use to the public, the best way to achieve this is to make it | ||
664 | free software which everyone can redistribute and change under these | ||
665 | terms. | ||
666 | |||
667 | To do so, attach the following notices to the program. It is safest | ||
668 | to attach them to the start of each source file to most effectively | ||
669 | state the exclusion of warranty; and each file should have at least | ||
670 | the ``copyright'' line and a pointer to where the full notice is found. | ||
671 | |||
672 | @smallexample | ||
673 | @var{one line to give the program's name and a brief idea of what it does.} | ||
674 | Copyright (C) @var{year} @var{name of author} | ||
675 | |||
676 | This program is free software: you can redistribute it and/or modify | ||
677 | it under the terms of the GNU General Public License as published by | ||
678 | the Free Software Foundation, either version 3 of the License, or (at | ||
679 | your option) any later version. | ||
680 | |||
681 | This program is distributed in the hope that it will be useful, but | ||
682 | WITHOUT ANY WARRANTY; without even the implied warranty of | ||
683 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE@. See the GNU | ||
684 | General Public License for more details. | ||
685 | |||
686 | You should have received a copy of the GNU General Public License | ||
687 | along with this program. If not, see @url{http://www.gnu.org/licenses/}. | ||
688 | @end smallexample | ||
689 | |||
690 | Also add information on how to contact you by electronic and paper mail. | ||
691 | |||
692 | If the program does terminal interaction, make it output a short | ||
693 | notice like this when it starts in an interactive mode: | ||
694 | |||
695 | @smallexample | ||
696 | @var{program} Copyright (C) @var{year} @var{name of author} | ||
697 | This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}. | ||
698 | This is free software, and you are welcome to redistribute it | ||
699 | under certain conditions; type @samp{show c} for details. | ||
700 | @end smallexample | ||
701 | |||
702 | The hypothetical commands @samp{show w} and @samp{show c} should show | ||
703 | the appropriate parts of the General Public License. Of course, your | ||
704 | program's commands might be different; for a GUI interface, you would | ||
705 | use an ``about box''. | ||
706 | |||
707 | You should also get your employer (if you work as a programmer) or school, | ||
708 | if any, to sign a ``copyright disclaimer'' for the program, if necessary. | ||
709 | For more information on this, and how to apply and follow the GNU GPL, see | ||
710 | @url{http://www.gnu.org/licenses/}. | ||
711 | |||
712 | The GNU General Public License does not permit incorporating your | ||
713 | program into proprietary programs. If your program is a subroutine | ||
714 | library, you may consider it more useful to permit linking proprietary | ||
715 | applications with the library. If this is what you want to do, use | ||
716 | the GNU Lesser General Public License instead of this License. But | ||
717 | first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}. | ||
diff --git a/doc/old/tutorial/htmlxref.cnf b/doc/old/tutorial/htmlxref.cnf new file mode 100644 index 000000000..a4928f6fe --- /dev/null +++ b/doc/old/tutorial/htmlxref.cnf | |||
@@ -0,0 +1,668 @@ | |||
1 | # htmlxref.cnf - reference file for free Texinfo manuals on the web. | ||
2 | # Modified by Ludovic Courtès <ludo@gnu.org> for the GNU Guix manual. | ||
3 | # Modified by ng0 <ng0@gnunet.org> for the GNUnet manual. | ||
4 | |||
5 | htmlxrefversion=2017-10-26.06; # UTC | ||
6 | |||
7 | # Copyright 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. | ||
8 | # | ||
9 | # Copying and distribution of this file, with or without modification, | ||
10 | # are permitted in any medium without royalty provided the copyright | ||
11 | # notice and this notice are preserved. | ||
12 | # | ||
13 | # The latest version of this file is available at | ||
14 | # http://ftpmirror.gnu.org/texinfo/htmlxref.cnf. | ||
15 | # Email corrections or additions to bug-texinfo@gnu.org. | ||
16 | # The primary goal is to list all relevant GNU manuals; | ||
17 | # other free manuals are also welcome. | ||
18 | # | ||
19 | # To be included in this list, a manual must: | ||
20 | # | ||
21 | # - have a generic url, e.g., no version numbers; | ||
22 | # - have a unique file name (e.g., manual identifier), i.e., be related to the | ||
23 | # package name. Things like "refman" or "tutorial" don't work. | ||
24 | # - follow the naming convention for nodes described at | ||
25 | # http://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Xref.html | ||
26 | # This is what makeinfo and texi2html implement. | ||
27 | # | ||
28 | # Unless the above criteria are met, it's not possible to generate | ||
29 | # reliable cross-manual references. | ||
30 | # | ||
31 | # For information on automatically generating all the useful formats for | ||
32 | # a manual to put on the web, see | ||
33 | # http://www.gnu.org/prep/maintain/html_node/Manuals-on-Web-Pages.html. | ||
34 | |||
35 | # For people editing this file: when a manual named foo is related to a | ||
36 | # package named bar, the url should contain a variable reference ${BAR}. | ||
37 | # Otherwise, the gnumaint scripts have no way of knowing they are | ||
38 | # associated, and thus gnu.org/manual can't include them. | ||
39 | |||
40 | # shorten references to manuals on www.gnu.org. | ||
41 | G = https://www.gnu.org | ||
42 | GS = ${G}/software | ||
43 | |||
44 | 3dldf mono ${GS}/3dldf/manual/user_ref/3DLDF.html | ||
45 | 3dldf node ${GS}/3dldf/manual/user_ref/ | ||
46 | |||
47 | alive mono ${GS}/alive/manual/alive.html | ||
48 | alive node ${GS}/alive/manual/html_node/ | ||
49 | |||
50 | anubis chapter ${GS}/anubis/manual/html_chapter/ | ||
51 | anubis section ${GS}/anubis/manual/html_section/ | ||
52 | anubis node ${GS}/anubis/manual/html_node/ | ||
53 | |||
54 | artanis mono ${GS}/artanis/manual/artanis.html | ||
55 | artanis node ${GS}/artanis/manual/html_node/ | ||
56 | |||
57 | aspell section http://aspell.net/man-html/index.html | ||
58 | |||
59 | auctex mono ${GS}/auctex/manual/auctex.html | ||
60 | auctex node ${GS}/auctex/manual/auctex/ | ||
61 | |||
62 | autoconf mono ${GS}/autoconf/manual/autoconf.html | ||
63 | autoconf node ${GS}/autoconf/manual/html_node/ | ||
64 | |||
65 | autogen mono ${GS}/autogen/manual/html_mono/autogen.html | ||
66 | autogen chapter ${GS}/autogen/manual/html_chapter/ | ||
67 | autogen node ${GS}/autoconf/manual/html_node/ | ||
68 | |||
69 | automake mono ${GS}/automake/manual/automake.html | ||
70 | automake node ${GS}/automake/manual/html_node/ | ||
71 | |||
72 | avl node http://www.stanford.edu/~blp/avl/libavl.html/ | ||
73 | |||
74 | bash mono ${GS}/bash/manual/bash.html | ||
75 | bash node ${GS}/bash/manual/html_node/ | ||
76 | |||
77 | BINUTILS = http://sourceware.org/binutils/docs | ||
78 | binutils node ${BINUTILS}/binutils/ | ||
79 | as node ${BINUTILS}/as/ | ||
80 | bfd node ${BINUTILS}/bfd/ | ||
81 | gprof node ${BINUTILS}/gprof/ | ||
82 | ld node ${BINUTILS}/ld/ | ||
83 | |||
84 | bison mono ${GS}/bison/manual/bison.html | ||
85 | bison node ${GS}/bison/manual/html_node/ | ||
86 | |||
87 | bpel2owfn mono ${GS}/bpel2owfn/manual/2.0.x/bpel2owfn.html | ||
88 | |||
89 | ccd2cue mono ${GS}/ccd2cue/manual/ccd2cue.html | ||
90 | ccd2cue node ${GS}/ccd2cue/manual/html_node/ | ||
91 | |||
92 | cflow mono ${GS}/cflow/manual/cflow.html | ||
93 | cflow node ${GS}/cflow/manual/html_node/ | ||
94 | |||
95 | chess mono ${GS}/chess/manual/gnuchess.html | ||
96 | chess node ${GS}/chess/manual/html_node/ | ||
97 | |||
98 | combine mono ${GS}/combine/manual/combine.html | ||
99 | combine chapter ${GS}/combine/manual/html_chapter/ | ||
100 | combine section ${GS}/combine/manual/html_section/ | ||
101 | combine node ${GS}/combine/manual/html_node/ | ||
102 | |||
103 | complexity mono ${GS}/complexity/manual/complexity.html | ||
104 | complexity node ${GS}/complexity/manual/html_node/ | ||
105 | |||
106 | coreutils mono ${GS}/coreutils/manual/coreutils | ||
107 | coreutils node ${GS}/coreutils/manual/html_node/ | ||
108 | |||
109 | cpio mono ${GS}/cpio/manual/cpio | ||
110 | cpio node ${GS}/cpio/manual/html_node/ | ||
111 | |||
112 | cssc node ${GS}/cssc/manual/ | ||
113 | |||
114 | #cvs cannot be handled here; see http://ximbiot.com/cvs/manual. | ||
115 | |||
116 | ddd mono ${GS}/ddd/manual/html_mono/ddd.html | ||
117 | |||
118 | ddrescue mono ${GS}/ddrescue/manual/ddrescue_manual.html | ||
119 | |||
120 | DICO = http://puszcza.gnu.org.ua/software/dico/manual | ||
121 | dico mono ${DICO}/dico.html | ||
122 | dico chapter ${DICO}/html_chapter/ | ||
123 | dico section ${DICO}/html_section/ | ||
124 | dico node ${DICO}/html_node/ | ||
125 | |||
126 | diffutils mono ${GS}/diffutils/manual/diffutils | ||
127 | diffutils node ${GS}/diffutils/manual/html_node/ | ||
128 | |||
129 | ed mono ${GS}/ed/manual/ed_manual.html | ||
130 | |||
131 | EMACS = ${GS}/emacs/manual | ||
132 | emacs mono ${EMACS}/html_mono/emacs.html | ||
133 | emacs node ${EMACS}/html_node/emacs/ | ||
134 | # | ||
135 | ada-mode mono ${EMACS}/html_mono/ada-mode.html | ||
136 | ada-mode node ${EMACS}/html_node/ada-mode/ | ||
137 | # | ||
138 | autotype mono ${EMACS}/html_mono/autotype.html | ||
139 | autotype node ${EMACS}/html_node/autotype/ | ||
140 | # | ||
141 | ccmode mono ${EMACS}/html_mono/ccmode.html | ||
142 | ccmode node ${EMACS}/html_node/ccmode/ | ||
143 | # | ||
144 | cl mono ${EMACS}/html_mono/cl.html | ||
145 | cl node ${EMACS}/html_node/cl/ | ||
146 | # | ||
147 | ebrowse mono ${EMACS}/html_mono/ebrowse.html | ||
148 | ebrowse node ${EMACS}/html_node/ebrowse/ | ||
149 | # | ||
150 | ediff mono ${EMACS}/html_mono/ediff.html | ||
151 | ediff node ${EMACS}/html_node/ediff/ | ||
152 | # | ||
153 | eieio mono ${EMACS}/html_mono/eieio.html | ||
154 | eieio node ${EMACS}/html_node/eieio/ | ||
155 | # | ||
156 | elisp mono ${EMACS}/html_mono/elisp.html | ||
157 | elisp node ${EMACS}/html_node/elisp/ | ||
158 | # | ||
159 | epa mono ${EMACS}/html_mono/epa.html | ||
160 | epa node ${EMACS}/html_node/epa/ | ||
161 | # | ||
162 | erc mono ${EMACS}/html_mono/erc.html | ||
163 | erc node ${EMACS}/html_node/erc/ | ||
164 | # | ||
165 | dired-x mono ${EMACS}/html_mono/dired-x.html | ||
166 | dired-x node ${EMACS}/html_node/dired-x/ | ||
167 | # | ||
168 | eshell mono ${EMACS}/html_mono/eshell.html | ||
169 | eshell node ${EMACS}/html_node/eshell/ | ||
170 | # | ||
171 | flymake mono ${EMACS}/html_mono/flymake.html | ||
172 | flymake node ${EMACS}/html_node/flymake/ | ||
173 | # | ||
174 | gnus mono ${EMACS}/html_mono/gnus.html | ||
175 | gnus node ${EMACS}/html_node/gnus/ | ||
176 | # | ||
177 | idlwave mono ${EMACS}/html_mono/idlwave.html | ||
178 | idlwave node ${EMACS}/html_node/idlwave/ | ||
179 | # | ||
180 | message mono ${EMACS}/html_mono/message.html | ||
181 | message node ${EMACS}/html_node/message/ | ||
182 | # | ||
183 | mh-e mono ${EMACS}/html_mono/mh-e.html | ||
184 | mh-e node ${EMACS}/html_node/mh-e/ | ||
185 | # | ||
186 | nxml-mode mono ${EMACS}/html_mono/nxml-mode.html | ||
187 | nxml-mode node ${EMACS}/html_node/nxml-mode/ | ||
188 | # | ||
189 | org mono ${EMACS}/html_mono/org.html | ||
190 | org node ${EMACS}/html_node/org/ | ||
191 | # | ||
192 | pcl-cvs mono ${EMACS}/html_mono/pcl-cvs.html | ||
193 | pcl-cvs node ${EMACS}/html_node/pcl-cvs/ | ||
194 | # | ||
195 | rcirc mono ${EMACS}/html_mono/rcirc.html | ||
196 | rcirc node ${EMACS}/html_node/rcirc/ | ||
197 | # | ||
198 | semantic mono ${EMACS}/html_mono/semantic.html | ||
199 | semantic node ${EMACS}/html_node/semantic/ | ||
200 | # | ||
201 | smtp mono ${EMACS}/html_mono/smtpmail.html | ||
202 | smtp node ${EMACS}/html_node/smtpmail/ | ||
203 | # | ||
204 | speedbar mono ${EMACS}/html_mono/speedbar.html | ||
205 | speedbar node ${EMACS}/html_node/speedbar/ | ||
206 | # | ||
207 | tramp mono ${EMACS}/html_mono/tramp.html | ||
208 | tramp node ${EMACS}/html_node/tramp/ | ||
209 | # | ||
210 | vip mono ${EMACS}/html_mono/vip.html | ||
211 | vip node ${EMACS}/html_node/vip/ | ||
212 | # | ||
213 | viper mono ${EMACS}/html_mono/viper.html | ||
214 | viper node ${EMACS}/html_node/viper/ | ||
215 | # | ||
216 | woman mono ${EMACS}/html_mono/woman.html | ||
217 | woman node ${EMACS}/html_node/woman/ | ||
218 | # (end emacs manuals) | ||
219 | |||
220 | easejs mono ${GS}/easejs/manual/easejs.html | ||
221 | easejs node ${GS}/easejs/manual/ | ||
222 | |||
223 | EMACS_GUIX = https://alezost.github.io/guix.el/manual/latest | ||
224 | emacs-guix mono ${EMACS_GUIX}/emacs-guix.html | ||
225 | emacs-guix node ${EMACS_GUIX}/html_node/ | ||
226 | |||
227 | emacs-muse node ${GS}/emacs-muse/manual/muse.html | ||
228 | emacs-muse node ${GS}/emacs-muse/manual/html_node/ | ||
229 | |||
230 | emms node ${GS}/emms/manual/ | ||
231 | |||
232 | # The file is called 'find.info' but the package is 'findutils'. | ||
233 | find mono ${GS}/findutils/manual/html_mono/find.html | ||
234 | find node ${GS}/findutils/manual/html_node/find_html | ||
235 | findutils mono ${GS}/findutils/manual/html_mono/find.html | ||
236 | findutils node ${GS}/findutils/manual/html_node/find_html | ||
237 | |||
238 | FLEX = http://flex.sourceforge.net | ||
239 | flex node ${FLEX}/manual/ | ||
240 | |||
241 | gama mono ${GS}/gama/manual/gama.html | ||
242 | gama node ${GS}/gama/manual/html_node/ | ||
243 | |||
244 | GAWK = ${GS}/gawk/manual | ||
245 | gawk mono ${GAWK}/gawk.html | ||
246 | gawk node ${GAWK}/html_node/ | ||
247 | gawkinet mono ${GAWK}/gawkinet/gawkinet.html | ||
248 | gawkinet node ${GAWK}/gawkinet/html_node/ | ||
249 | |||
250 | gcal mono ${GS}/gcal/manual/gcal.html | ||
251 | gcal node ${GS}/gcal/manual/html_node/ | ||
252 | |||
253 | GCC = http://gcc.gnu.org/onlinedocs | ||
254 | gcc node ${GCC}/gcc/ | ||
255 | cpp node ${GCC}/cpp/ | ||
256 | gcj node ${GCC}/gcj/ | ||
257 | gfortran node ${GCC}/gfortran/ | ||
258 | gnat_rm node ${GCC}/gnat_rm/ | ||
259 | gnat_ugn_unw node ${GCC}/gnat_ugn_unw/ | ||
260 | libgomp node ${GCC}/libgomp/ | ||
261 | libstdc++ node ${GCC}/libstdc++/ | ||
262 | # | ||
263 | gccint node ${GCC}/gccint/ | ||
264 | cppinternals node ${GCC}/cppinternals/ | ||
265 | gfc-internals node ${GCC}/gfc-internals/ | ||
266 | gnat-style node ${GCC}/gnat-style/ | ||
267 | libiberty node ${GCC}/libiberty/ | ||
268 | |||
269 | GDB = http://sourceware.org/gdb/current/onlinedocs | ||
270 | gdb node ${GDB}/gdb/ | ||
271 | stabs node ${GDB}/stabs/ | ||
272 | |||
273 | GDBM = http://www.gnu.org.ua/software/gdbm/manual | ||
274 | gdbm mono ${GDBM}/gdbm.html | ||
275 | gdbm chapter ${GDBM}/html_chapter/ | ||
276 | gdbm section ${GDBM}/html_section/ | ||
277 | gdbm node ${GDBM}/html_node/ | ||
278 | |||
279 | gettext mono ${GS}/gettext/manual/gettext.html | ||
280 | gettext node ${GS}/gettext/manual/html_node/ | ||
281 | |||
282 | gforth node http://www.complang.tuwien.ac.at/forth/gforth/Docs-html/ | ||
283 | |||
284 | global mono ${GS}/global/manual/global.html | ||
285 | |||
286 | gmediaserver node ${GS}/gmediaserver/manual/ | ||
287 | |||
288 | gmp node http://www.gmplib.org/manual/ | ||
289 | |||
290 | gnu-arch node ${GS}/gnu-arch/tutorial/ | ||
291 | |||
292 | gnu-c-manual mono ${GS}/gnu-c-manual/gnu-c-manual.html | ||
293 | |||
294 | gnu-crypto node ${GS}/gnu-crypto/manual/ | ||
295 | |||
296 | gnubg mono ${GS}/gnubg/manual/gnubg.html | ||
297 | gnubg node ${GS}/gnubg/manual/html_node/ | ||
298 | |||
299 | gnubik mono ${GS}/gnubik/manual/gnubik.html | ||
300 | gnubik node ${GS}/gnubik/manual/html_node/ | ||
301 | |||
302 | gnulib mono ${GS}/gnulib/manual/gnulib.html | ||
303 | gnulib node ${GS}/gnulib/manual/html_node/ | ||
304 | |||
305 | GNUN = ${GS}/trans-coord/manual | ||
306 | gnun mono ${GNUN}/gnun/gnun.html | ||
307 | gnun node ${GNUN}/gnun/html_node/ | ||
308 | web-trans mono ${GNUN}/web-trans/web-trans.html | ||
309 | web-trans node ${GNUN}/web-trans/html_node/ | ||
310 | |||
311 | GNUNET = https://docs.gnunet.org/manuals | ||
312 | gnunet node ${GNUNET}/gnunet/ | ||
313 | gnunet-c-tutorial node ${GNUNET}/gnunet-c-tutorial/ | ||
314 | gnunet-java-tutorial node ${GNUNET}/gnunet-java-tutorial/ | ||
315 | |||
316 | GNUPG = http://www.gnupg.org/documentation/manuals | ||
317 | gnupg node ${GNUPG}/gnupg/ | ||
318 | dirmngr node ${GNUPG}/dirmngr/ | ||
319 | gcrypt node ${GNUPG}/gcrypt/ | ||
320 | libgcrypt node ${GNUPG}/gcrypt/ | ||
321 | ksba node ${GNUPG}/ksba/ | ||
322 | assuan node ${GNUPG}/assuan/ | ||
323 | gpgme node ${GNUPG}/gpgme/ | ||
324 | |||
325 | gnuprologjava node ${GS}/gnuprologjava/manual/ | ||
326 | |||
327 | gnuschool mono ${GS}/gnuschool/gnuschool.html | ||
328 | |||
329 | GNUSTANDARDS = ${G}/prep | ||
330 | maintain mono ${GNUSTANDARDS}/maintain/maintain.html | ||
331 | maintain node ${GNUSTANDARDS}/maintain/html_node/ | ||
332 | # | ||
333 | standards mono ${GNUSTANDARDS}/standards/standards.html | ||
334 | standards node ${GNUSTANDARDS}/standards/html_node/ | ||
335 | |||
336 | gnutls mono http://gnutls.org/manual/gnutls.html | ||
337 | gnutls node http://gnutls.org/manual/html_node/ | ||
338 | |||
339 | gnutls-guile mono http://gnutls.org/manual/gnutls-guile.html | ||
340 | gnutls-guile node http://gnutls.org/manual/gnutls-guile/ | ||
341 | |||
342 | gperf mono ${GS}/gperf/manual/gperf.html | ||
343 | gperf node ${GS}/gperf/manual/html_node/ | ||
344 | |||
345 | grep mono ${GS}/grep/manual/grep.html | ||
346 | grep node ${GS}/grep/manual/html_node/ | ||
347 | |||
348 | groff node ${GS}/groff/manual/html_node/ | ||
349 | |||
350 | GRUB = ${GS}/grub/manual | ||
351 | grub mono ${GRUB}/grub.html | ||
352 | grub node ${GRUB}/html_node/ | ||
353 | # | ||
354 | multiboot mono ${GRUB}/multiboot/multiboot.html | ||
355 | multiboot node ${GRUB}/multiboot/html_node/ | ||
356 | |||
357 | gsasl mono ${GS}/gsasl/manual/gsasl.html | ||
358 | gsasl node ${GS}/gsasl/manual/html_node/ | ||
359 | |||
360 | gsl node ${GS}/gsl/manual/html_node/ | ||
361 | |||
362 | gsrc mono ${GS}/gsrc/manual/gsrc.html | ||
363 | gsrc node ${GS}/gsrc/manual/html_node/ | ||
364 | |||
365 | gss mono ${GS}/gss/manual/gss.html | ||
366 | gss node ${GS}/gss/manual/html_node/ | ||
367 | |||
368 | gtypist mono ${GS}/gtypist/doc/ | ||
369 | |||
370 | guile mono ${GS}/guile/manual/guile.html | ||
371 | guile node ${GS}/guile/manual/html_node/ | ||
372 | |||
373 | guile-avahi mono http://nongnu.org/guile-avahi/doc/guile-avahi.html | ||
374 | |||
375 | GUILE_GNOME = ${GS}/guile-gnome/docs | ||
376 | gobject node ${GUILE_GNOME}/gobject/html/ | ||
377 | glib node ${GUILE_GNOME}/glib/html/ | ||
378 | atk node ${GUILE_GNOME}/atk/html/ | ||
379 | pango node ${GUILE_GNOME}/pango/html/ | ||
380 | pangocairo node ${GUILE_GNOME}/pangocairo/html/ | ||
381 | gdk node ${GUILE_GNOME}/gdk/html/ | ||
382 | gtk node ${GUILE_GNOME}/gtk/html/ | ||
383 | libglade node ${GUILE_GNOME}/libglade/html/ | ||
384 | gnome-vfs node ${GUILE_GNOME}/gnome-vfs/html/ | ||
385 | libgnomecanvas node ${GUILE_GNOME}/libgnomecanvas/html/ | ||
386 | gconf node ${GUILE_GNOME}/gconf/html/ | ||
387 | libgnome node ${GUILE_GNOME}/libgnome/html/ | ||
388 | libgnomeui node ${GUILE_GNOME}/libgnomeui/html/ | ||
389 | corba node ${GUILE_GNOME}/corba/html/ | ||
390 | clutter node ${GUILE_GNOME}/clutter/html/ | ||
391 | clutter-glx node ${GUILE_GNOME}/clutter-glx/html/ | ||
392 | |||
393 | guile-gtk node ${GS}/guile-gtk/docs/guile-gtk/ | ||
394 | |||
395 | guile-rpc mono ${GS}/guile-rpc/manual/guile-rpc.html | ||
396 | guile-rpc node ${GS}/guile-rpc/manual/html_node/ | ||
397 | |||
398 | guix mono ${GS}/guix/manual/guix.html | ||
399 | guix node ${GS}/guix/manual/html_node/ | ||
400 | |||
401 | gv mono ${GS}/gv/manual/gv.html | ||
402 | gv node ${GS}/gv/manual/html_node/ | ||
403 | |||
404 | gzip mono ${GS}/gzip/manual/gzip.html | ||
405 | gzip node ${GS}/gzip/manual/html_node/ | ||
406 | |||
407 | hello mono ${GS}/hello/manual/hello.html | ||
408 | hello node ${GS}/hello/manual/html_node/ | ||
409 | |||
410 | help2man mono ${GS}/help2man/help2man.html | ||
411 | |||
412 | idutils mono ${GS}/idutils/manual/idutils.html | ||
413 | idutils node ${GS}/idutils/manual/html_node/ | ||
414 | |||
415 | inetutils mono ${GS}/inetutils/manual/inetutils.html | ||
416 | inetutils node ${GS}/inetutils/manual/html_node/ | ||
417 | |||
418 | jwhois mono ${GS}/jwhois/manual/jwhois.html | ||
419 | jwhois node ${GS}/jwhois/manual/html_node/ | ||
420 | |||
421 | libc mono ${GS}/libc/manual/html_mono/libc.html | ||
422 | libc node ${GS}/libc/manual/html_node/ | ||
423 | |||
424 | LIBCDIO = ${GS}/libcdio | ||
425 | libcdio mono ${LIBCDIO}/libcdio.html | ||
426 | cd-text mono ${LIBCDIO}/cd-text-format.html | ||
427 | |||
428 | libextractor mono ${GS}/libextractor/manual/libextractor.html | ||
429 | libextractor node ${GS}/libextractor/manual/html_node/ | ||
430 | |||
431 | libidn mono ${GS}/libidn/manual/libidn.html | ||
432 | libidn node ${GS}/libidn/manual/html_node/ | ||
433 | |||
434 | librejs mono ${GS}/librejs/manual/librejs.html | ||
435 | librejs node ${GS}/librejs/manual/html_node/ | ||
436 | |||
437 | libmatheval mono ${GS}/libmatheval/manual/libmatheval.html | ||
438 | |||
439 | LIBMICROHTTPD = ${GS}/libmicrohttpd | ||
440 | libmicrohttpd mono ${LIBMICROHTTPD}/manual/libmicrohttpd.html | ||
441 | libmicrohttpd node ${LIBMICROHTTPD}/manual/html_node/ | ||
442 | microhttpd-tutorial mono ${LIBMICROHTTPD}/tutorial.html | ||
443 | |||
444 | libtasn1 mono ${GS}/libtasn1/manual/libtasn1.html | ||
445 | libtasn1 node ${GS}/libtasn1/manual/html_node/ | ||
446 | |||
447 | libtool mono ${GS}/libtool/manual/libtool.html | ||
448 | libtool node ${GS}/libtool/manual/html_node/ | ||
449 | |||
450 | lightning mono ${GS}/lightning/manual/lightning.html | ||
451 | lightning node ${GS}/lightning/manual/html_node/ | ||
452 | |||
453 | # The stable/ url redirects immediately, but that's ok. | ||
454 | # The .html extension is omitted on their web site, but it works if given. | ||
455 | LILYPOND = http://lilypond.org/doc/stable/Documentation | ||
456 | lilypond-internals node ${LILYPOND}/internals/ | ||
457 | lilypond-learning node ${LILYPOND}/learning/ | ||
458 | lilypond-notation node ${LILYPOND}/notation/ | ||
459 | lilypond-snippets node ${LILYPOND}/snippets/ | ||
460 | lilypond-usage node ${LILYPOND}/usage/ | ||
461 | lilypond-web node ${LILYPOND}/web/ | ||
462 | music-glossary node ${LILYPOND}/music-glossary/ | ||
463 | |||
464 | liquidwar6 mono ${GS}/liquidwar6/manual/liquidwar6.html | ||
465 | liquidwar6 node ${GS}/liquidwar6/manual/html_node/ | ||
466 | |||
467 | lispintro mono ${GS}/emacs/emacs-lisp-intro/html_mono/emacs-lisp-intro.html | ||
468 | lispintro node ${GS}/emacs/emacs-lisp-intro/html_node/index.html | ||
469 | |||
470 | LSH = http://www.lysator.liu.se/~nisse/lsh | ||
471 | lsh mono ${LSH}/lsh.html | ||
472 | |||
473 | m4 mono ${GS}/m4/manual/m4.html | ||
474 | m4 node ${GS}/m4/manual/html_node/ | ||
475 | |||
476 | mailutils mono ${GS}/mailutils/manual/mailutils.html | ||
477 | mailutils chapter ${GS}/mailutils/manual/html_chapter/ | ||
478 | mailutils section ${GS}/mailutils/manual/html_section/ | ||
479 | mailutils node ${GS}/mailutils/manual/html_node/ | ||
480 | |||
481 | make mono ${GS}/make/manual/make.html | ||
482 | make node ${GS}/make/manual/html_node/ | ||
483 | |||
484 | mcron mono ${GS}/mcron/manual/mcron.html | ||
485 | mcron node ${GS}/mcron/manual/html_node/ | ||
486 | |||
487 | mdk mono ${GS}/mdk/manual/mdk.html | ||
488 | mdk node ${GS}/mdk/manual/html_node/ | ||
489 | |||
490 | METAEXCHANGE = http://ftp.gwdg.de/pub/gnu2/iwfmdh/doc/texinfo | ||
491 | iwf_mh node ${METAEXCHANGE}/iwf_mh.html | ||
492 | scantest node ${METAEXCHANGE}/scantest.html | ||
493 | |||
494 | MIT_SCHEME = ${GS}/mit-scheme/documentation | ||
495 | mit-scheme-ref node ${MIT_SCHEME}/mit-scheme-ref/ | ||
496 | mit-scheme-user node ${MIT_SCHEME}/mit-scheme-user/ | ||
497 | sos node ${MIT_SCHEME}/mit-scheme-sos/ | ||
498 | mit-scheme-imail node ${MIT_SCHEME}/mit-scheme-imail/ | ||
499 | |||
500 | moe mono ${GS}/moe/manual/moe_manual.html | ||
501 | |||
502 | motti node ${GS}/motti/manual/ | ||
503 | |||
504 | mpc node http://www.multiprecision.org/index.php?prog=mpc&page=html | ||
505 | |||
506 | mpfr mono http://www.mpfr.org/mpfr-current/mpfr.html | ||
507 | |||
508 | mtools mono ${GS}/mtools/manual/mtools.html | ||
509 | |||
510 | myserver node http://www.myserverproject.net/documentation/ | ||
511 | |||
512 | nano mono http://www.nano-editor.org/dist/latest/nano.html | ||
513 | |||
514 | nettle chapter http://www.lysator.liu.se/~nisse/nettle/nettle.html | ||
515 | |||
516 | ocrad mono ${GS}/ocrad/manual/ocrad_manual.html | ||
517 | |||
518 | parted mono ${GS}/parted/manual/parted.html | ||
519 | parted node ${GS}/parted/manual/html_node/ | ||
520 | |||
521 | pascal mono http://www.gnu-pascal.de/gpc/ | ||
522 | |||
523 | # can't use pcb since url's contain dates --30nov10 | ||
524 | |||
525 | perl mono ${GS}/perl/manual/perldoc-all.html | ||
526 | |||
527 | PIES = http://www.gnu.org.ua/software/pies/manual | ||
528 | pies mono ${PIES}/pies.html | ||
529 | pies chapter ${PIES}/html_chapter/ | ||
530 | pies section ${PIES}/html_section/ | ||
531 | pies node ${PIES}/html_node/ | ||
532 | |||
533 | plotutils mono ${GS}/plotutils/manual/en/plotutils.html | ||
534 | plotutils node ${GS}/plotutils/manual/en/html_node/ | ||
535 | |||
536 | proxyknife mono ${GS}/proxyknife/manual/proxyknife.html | ||
537 | proxyknife node ${GS}/proxyknife/manual/html_node/ | ||
538 | |||
539 | pspp mono ${GS}/pspp/manual/pspp.html | ||
540 | pspp node ${GS}/pspp/manual/html_node/ | ||
541 | |||
542 | pyconfigure mono ${GS}/pyconfigure/manual/pyconfigure.html | ||
543 | pyconfigure node ${GS}/pyconfigure/manual/html_node/ | ||
544 | |||
545 | R = http://cran.r-project.org/doc/manuals | ||
546 | R-intro mono ${R}/R-intro.html | ||
547 | R-lang mono ${R}/R-lang.html | ||
548 | R-exts mono ${R}/R-exts.html | ||
549 | R-data mono ${R}/R-data.html | ||
550 | R-admin mono ${R}/R-admin.html | ||
551 | R-ints mono ${R}/R-ints.html | ||
552 | |||
553 | rcs mono ${GS}/rcs/manual/rcs.html | ||
554 | rcs node ${GS}/rcs/manual/html_node/ | ||
555 | |||
556 | READLINE = http://cnswww.cns.cwru.edu/php/chet/readline | ||
557 | readline mono ${READLINE}/readline.html | ||
558 | rluserman mono ${READLINE}/rluserman.html | ||
559 | history mono ${READLINE}/history.html | ||
560 | |||
561 | recode mono http://recode.progiciels-bpi.ca/manual/index.html | ||
562 | |||
563 | recutils mono ${GS}/recutils/manual/recutils.html | ||
564 | recutils node ${GS}/recutils/manual/html_node/ | ||
565 | |||
566 | reftex mono ${GS}/auctex/manual/reftex.html | ||
567 | reftex node ${GS}/auctex/manual/reftex/ | ||
568 | |||
569 | remotecontrol mono ${GS}/remotecontrol/manual/remotecontrol.html | ||
570 | remotecontrol node ${GS}/remotecontrol/manual/html_node/ | ||
571 | |||
572 | rottlog mono ${GS}/rottlog/manual/rottlog.html | ||
573 | rottlog node ${GS}/rottlog/manual/html_node/ | ||
574 | |||
575 | RUSH = http://www.gnu.org.ua/software/rush/manual | ||
576 | rush mono ${RUSH}/rush.html | ||
577 | rush chapter ${RUSH}/html_chapter/ | ||
578 | rush section ${RUSH}/html_section/ | ||
579 | rush node ${RUSH}/html_node/ | ||
580 | |||
581 | screen mono ${GS}/screen/manual/screen.html | ||
582 | screen node ${GS}/screen/manual/html_node/ | ||
583 | |||
584 | sed mono ${GS}/sed/manual/sed.html | ||
585 | sed node ${GS}/sed/manual/html_node/ | ||
586 | |||
587 | sharutils mono ${GS}/sharutils/manual/html_mono/sharutils.html | ||
588 | sharutils chapter ${GS}/sharutils/manual/html_chapter/ | ||
589 | sharutils node ${GS}/sharutils/manual/html_node/ | ||
590 | |||
591 | shepherd mono ${GS}/shepherd/manual/shepherd.html | ||
592 | shepherd node ${GS}/shepherd/manual/html_node/ | ||
593 | |||
594 | # can't use mono files since they have generic names | ||
595 | SMALLTALK = ${GS}/smalltalk | ||
596 | smalltalk node ${SMALLTALK}/manual/html_node/ | ||
597 | smalltalk-base node ${SMALLTALK}/manual-base/html_node/ | ||
598 | smalltalk-libs node ${SMALLTALK}/manual-libs/html_node/ | ||
599 | |||
600 | sourceinstall mono ${GS}/sourceinstall/manual/sourceinstall.html | ||
601 | sourceinstall node ${GS}/sourceinstall/manual/html_node/ | ||
602 | |||
603 | sqltutor mono ${GS}/sqltutor/manual/sqltutor.html | ||
604 | sqltutor node ${GS}/sqltutor/manual/html_node/ | ||
605 | |||
606 | src-highlite mono ${GS}/src-highlite/source-highlight.html | ||
607 | |||
608 | swbis mono ${GS}/swbis/manual.html | ||
609 | |||
610 | tar mono ${GS}/tar/manual/tar.html | ||
611 | tar chapter ${GS}/tar/manual/html_chapter/ | ||
612 | tar section ${GS}/tar/manual/html_section/ | ||
613 | tar node ${GS}/autoconf/manual/html_node/ | ||
614 | |||
615 | teseq mono ${GS}/teseq/teseq.html | ||
616 | teseq node ${GS}/teseq/html_node/ | ||
617 | |||
618 | TEXINFO = ${GS}/texinfo/manual | ||
619 | texinfo mono ${TEXINFO}/texinfo/texinfo.html | ||
620 | texinfo node ${TEXINFO}/texinfo/html_node/ | ||
621 | # | ||
622 | info mono ${TEXINFO}/info/info.html | ||
623 | info node ${TEXINFO}/info/html_node/ | ||
624 | # | ||
625 | info-stnd mono ${TEXINFO}/info-stnd/info-stnd.html | ||
626 | info-stnd node ${TEXINFO}/info-stnd/html_node/ | ||
627 | |||
628 | thales node ${GS}/thales/manual/ | ||
629 | |||
630 | units mono ${GS}/units/manual/units.html | ||
631 | units node ${GS}/units/manual/html_node/ | ||
632 | |||
633 | vc-dwim mono ${GS}/vc-dwim/manual/vc-dwim.html | ||
634 | vc-dwim node ${GS}/vc-dwim/manual/html_node/ | ||
635 | |||
636 | wdiff mono ${GS}/wdiff/manual/wdiff.html | ||
637 | wdiff node ${GS}/wdiff/manual/html_node/ | ||
638 | |||
639 | websocket4j mono ${GS}/websocket4j/manual/websocket4j.html | ||
640 | websocket4j node ${GS}/websocket4j/manual/html_node/ | ||
641 | |||
642 | wget mono ${GS}/wget/manual/wget.html | ||
643 | wget node ${GS}/wget/manual/html_node/ | ||
644 | |||
645 | xboard mono ${GS}/xboard/manual/xboard.html | ||
646 | xboard node ${GS}/xboard/manual/html_node/ | ||
647 | |||
648 | # emacs-page | ||
649 | # Free TeX-related Texinfo manuals on tug.org. | ||
650 | |||
651 | T = http://tug.org/texinfohtml | ||
652 | |||
653 | dvipng mono ${T}/dvipng.html | ||
654 | dvips mono ${T}/dvips.html | ||
655 | eplain mono ${T}/eplain.html | ||
656 | kpathsea mono ${T}/kpathsea.html | ||
657 | latex2e mono ${T}/latex2e.html | ||
658 | tlbuild mono ${T}/tlbuild.html | ||
659 | web2c mono ${T}/web2c.html | ||
660 | |||
661 | |||
662 | # Local Variables: | ||
663 | # eval: (add-hook 'write-file-hooks 'time-stamp) | ||
664 | # time-stamp-start: "htmlxrefversion=" | ||
665 | # time-stamp-format: "%:y-%02m-%02d.%02H" | ||
666 | # time-stamp-time-zone: "UTC" | ||
667 | # time-stamp-end: "; # UTC" | ||
668 | # End: | ||
diff --git a/doc/old/tutorial/manual.css b/doc/old/tutorial/manual.css new file mode 100644 index 000000000..0fe08b83c --- /dev/null +++ b/doc/old/tutorial/manual.css | |||
@@ -0,0 +1,52 @@ | |||
1 | /* Style-sheet to use for manuals (copied from Emacs) */ | ||
2 | |||
3 | @import url('style.css'); | ||
4 | |||
5 | /* makeinfo 6.5 converts @quotation to <blockquote>. Highlight them. */ | ||
6 | blockquote { | ||
7 | font-style: normal; | ||
8 | border-left: solid 10px red; | ||
9 | padding-left: 2.5%; | ||
10 | margin-left: 0px; | ||
11 | } | ||
12 | |||
13 | var { font-style: italic; } | ||
14 | |||
15 | /* Lay out @lisp just like @example. Copied from what /style.css | ||
16 | does for the 'example' class. */ | ||
17 | div.lisp { padding: .8em 1.2em .4em; } | ||
18 | pre.lisp { padding: .8em 1.2em; } | ||
19 | div.lisp, pre.lisp { | ||
20 | margin: 1em 0 1em 3% ; | ||
21 | -webkit-border-radius: .3em; | ||
22 | -moz-border-radius: .3em; | ||
23 | border-radius: .3em; | ||
24 | border: 1px solid #d4cbb6; | ||
25 | background-color: #f2efe4; | ||
26 | } | ||
27 | div.lisp > pre.lisp { | ||
28 | padding: 0 0 .4em; | ||
29 | margin: 0; | ||
30 | border: none; | ||
31 | } | ||
32 | |||
33 | /* ----- coreutils specific styling ----- */ | ||
34 | |||
35 | /* layout.css indents "body p" when it should probably only indent "body > p"? | ||
36 | In any case, disable indenting of p in these sub elements. */ | ||
37 | dd p,li p { | ||
38 | margin-left: 0; | ||
39 | margin-right: 0; | ||
40 | } | ||
41 | |||
42 | /* underlined links are distracting, especially within outlined tables. */ | ||
43 | a { /*add :link for external links*/ | ||
44 | text-decoration: none; /* don't underline links by default */ | ||
45 | outline-style: none; /* don't put dotted box around clicked links */ | ||
46 | } | ||
47 | a:hover { | ||
48 | text-decoration: underline; | ||
49 | } | ||
50 | |||
51 | /* The shadow around the body is distracting. */ | ||
52 | body { box-shadow: 0 0 0 0; } | ||
diff --git a/doc/old/tutorial/reset.css b/doc/old/tutorial/reset.css new file mode 100644 index 000000000..9a6c3065f --- /dev/null +++ b/doc/old/tutorial/reset.css | |||
@@ -0,0 +1,114 @@ | |||
1 | /* | ||
2 | Software License Agreement (BSD License) | ||
3 | |||
4 | Copyright (c) 2006, Yahoo! Inc. | ||
5 | All rights reserved. | ||
6 | |||
7 | Redistribution and use of this software in source and | ||
8 | binary forms, with or without modification, arepermitted | ||
9 | provided that the following conditions are met: | ||
10 | |||
11 | * Redistributions of source code must retain the above | ||
12 | copyright notice, this list of conditions and the | ||
13 | following disclaimer. | ||
14 | |||
15 | * Redistributions in binary form must reproduce the above | ||
16 | copyright notice, this list of conditions and the | ||
17 | following disclaimer in the documentation and/or other | ||
18 | materials provided with the distribution. | ||
19 | |||
20 | * Neither the name of Yahoo! Inc. nor the names of its | ||
21 | contributors may be used to endorse or promote products | ||
22 | derived from this software without specific prior | ||
23 | written permission of Yahoo! Inc. | ||
24 | |||
25 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND | ||
26 | CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
27 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
28 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
29 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | ||
30 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
31 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
32 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
33 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
34 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER | ||
35 | IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
36 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
37 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
38 | SUCH DAMAGE. | ||
39 | */ | ||
40 | |||
41 | html { | ||
42 | color: #000; | ||
43 | background: #FFF; | ||
44 | } | ||
45 | |||
46 | body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, | ||
47 | h5, h6, pre, code, form, fieldset, legend, input, | ||
48 | button, textarea, p, blockquote, th, td { | ||
49 | margin: 0; | ||
50 | padding: 0; | ||
51 | } | ||
52 | |||
53 | table { | ||
54 | border-collapse: collapse; | ||
55 | border-spacing: 0; | ||
56 | } | ||
57 | |||
58 | fieldset, img { | ||
59 | border: 0; | ||
60 | } | ||
61 | |||
62 | address, caption, cite, code, dfn, em, strong, | ||
63 | th, var, optgroup { | ||
64 | font-style: inherit; | ||
65 | font-weight: inherit; | ||
66 | } | ||
67 | |||
68 | del, ins { | ||
69 | text-decoration: none; | ||
70 | } | ||
71 | |||
72 | li { | ||
73 | list-style:none; | ||
74 | } | ||
75 | |||
76 | caption, th { | ||
77 | text-align: left; | ||
78 | } | ||
79 | |||
80 | h1, h2, h3, h4, h5, h6 { | ||
81 | font-size: 100%; | ||
82 | font-weight: normal; | ||
83 | } | ||
84 | |||
85 | q:before, q:after { | ||
86 | content:''; | ||
87 | } | ||
88 | |||
89 | abbr, acronym { | ||
90 | border: 0; | ||
91 | font-variant: normal; | ||
92 | } | ||
93 | |||
94 | sup { | ||
95 | vertical-align: baseline; | ||
96 | } | ||
97 | sub { | ||
98 | vertical-align: baseline; | ||
99 | } | ||
100 | |||
101 | legend { | ||
102 | color: #000; | ||
103 | } | ||
104 | |||
105 | input, button, textarea, select, optgroup, option { | ||
106 | font-family: inherit; | ||
107 | font-size: inherit; | ||
108 | font-style: inherit; | ||
109 | font-weight: inherit; | ||
110 | } | ||
111 | |||
112 | input, button, textarea, select { | ||
113 | *font-size: 100%; | ||
114 | } | ||
diff --git a/doc/old/tutorial/run-gendocs.sh b/doc/old/tutorial/run-gendocs.sh new file mode 100755 index 000000000..b4899722c --- /dev/null +++ b/doc/old/tutorial/run-gendocs.sh | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | make version.texi/replacement | ||
4 | |||
5 | ./gendocs.sh --email gnunet-developers@gnu.org gnunet-c-tutorial "GNUnet C Tutorial" -o "manual/gnunet-c-tutorial" | ||
6 | #cd manual | ||
7 | #mkdir gnunet-c-tutorial | ||
8 | #mv * gnunet-c-tutorial/ | ||
9 | #cd .. | ||
10 | #./gendocs.sh --email gnunet-developers@gnu.org gnunet "GNUnet Reference Manual" -o "manual/gnunet" | ||
11 | #cd manual | ||
12 | #mkdir handbook | ||
13 | #mkdir ../tmp-gnunet | ||
14 | #mv gnunet ../tmp-gnunet | ||
15 | #mv * handbook/ | ||
16 | #mv ../tmp-gnunet gnunet | ||
17 | cp "index.html" manual/ | ||
18 | printf "Success" | ||
diff --git a/doc/old/tutorial/style.css b/doc/old/tutorial/style.css new file mode 100644 index 000000000..e5271197b --- /dev/null +++ b/doc/old/tutorial/style.css | |||
@@ -0,0 +1,174 @@ | |||
1 | /* This stylesheet is used by manuals and a few older resources. */ | ||
2 | |||
3 | @import url('reset.css'); | ||
4 | |||
5 | |||
6 | /*** PAGE LAYOUT ***/ | ||
7 | |||
8 | html, body { | ||
9 | font-size: 1em; | ||
10 | text-align: left; | ||
11 | text-decoration: none; | ||
12 | } | ||
13 | html { background-color: #e7e7e7; } | ||
14 | |||
15 | body { | ||
16 | max-width: 74.92em; | ||
17 | margin: 0 auto; | ||
18 | padding: .5em 1em 1em 1em; | ||
19 | background-color: white; | ||
20 | border: .1em solid #c0c0c0; | ||
21 | } | ||
22 | |||
23 | |||
24 | /*** BASIC ELEMENTS ***/ | ||
25 | |||
26 | /* Size and positioning */ | ||
27 | |||
28 | p, pre, li, dt, dd, table, code, address { line-height: 1.3em; } | ||
29 | |||
30 | h1 { font-size: 2em; margin: 1em 0 } | ||
31 | h2 { font-size: 1.50em; margin: 1.0em 0 0.87em 0; } | ||
32 | h3 { font-size: 1.30em; margin: 1.0em 0 0.87em 0; } | ||
33 | h4 { font-size: 1.13em; margin: 1.0em 0 0.88em 0; } | ||
34 | h5 { font-size: 1.00em; margin: 1.0em 0 1.00em 0; } | ||
35 | |||
36 | p, pre { margin: 1em 0; } | ||
37 | pre { overflow: auto; padding-bottom: .3em; } | ||
38 | |||
39 | ul, ol, blockquote { margin-left: 1.5%; margin-right: 1.5%; } | ||
40 | hr { margin: 1em 0; } | ||
41 | /* Lists of underlined links are difficult to read. The top margin | ||
42 | gives a little more spacing between entries. */ | ||
43 | ul li { margin: .5em 1em; } | ||
44 | ol li { margin: 1em; } | ||
45 | ol ul li { margin: .5em 1em; } | ||
46 | ul li p, ul ul li { margin-top: .3em; margin-bottom: .3em; } | ||
47 | ul ul, ol ul { margin-top: 0; margin-bottom: 0; } | ||
48 | |||
49 | /* Separate description lists from preceding text */ | ||
50 | dl { margin: 1em 0 0 0; } | ||
51 | /* separate the "term" from subsequent "description" */ | ||
52 | dt { margin: .5em 0; } | ||
53 | /* separate the "description" from subsequent list item | ||
54 | when the final <dd> child is an anonymous box */ | ||
55 | dd { margin: .5em 3% 1em 3%; } | ||
56 | /* separate anonymous box (used to be the first element in <dd>) | ||
57 | from subsequent <p> */ | ||
58 | dd p { margin: .5em 0; } | ||
59 | |||
60 | table { | ||
61 | display: block; overflow: auto; | ||
62 | margin-top: 1.5em; margin-bottom: 1.5em; | ||
63 | } | ||
64 | th { padding: .3em .5em; text-align: center; } | ||
65 | td { padding: .2em .5em; } | ||
66 | |||
67 | address { margin-bottom: 1em; } | ||
68 | caption { margin-bottom: .5em; text-align: center; } | ||
69 | sup { vertical-align: super; } | ||
70 | sub { vertical-align: sub; } | ||
71 | |||
72 | /* Style */ | ||
73 | |||
74 | h1, h2, h3, h4, h5, h6, strong, dt, th { font-weight: bold; } | ||
75 | |||
76 | /* The default color (black) is too dark for large text in | ||
77 | bold font. */ | ||
78 | h1, h2, h3, h4 { color: #333; } | ||
79 | h5, h6, dt { color: #222; } | ||
80 | |||
81 | a[href] { color: #005090; } | ||
82 | a[href]:visited { color: #100070; } | ||
83 | a[href]:active, a[href]:hover { | ||
84 | color: #100070; | ||
85 | text-decoration: none; | ||
86 | } | ||
87 | |||
88 | h1 a[href]:visited, h2 a[href]:visited, h3 a[href]:visited, | ||
89 | h4 a[href]:visited { color: #005090; } | ||
90 | h1 a[href]:hover, h2 a[href]:hover, h3 a[href]:hover, | ||
91 | h4 a[href]:hover { color: #100070; } | ||
92 | |||
93 | ol { list-style: decimal outside;} | ||
94 | ul { list-style: square outside; } | ||
95 | ul ul, ol ul { list-style: circle; } | ||
96 | li { list-style: inherit; } | ||
97 | |||
98 | hr { background-color: #ede6d5; } | ||
99 | table { border: 0; } | ||
100 | |||
101 | abbr,acronym { | ||
102 | border-bottom:1px dotted #000; | ||
103 | text-decoration: none; | ||
104 | cursor:help; | ||
105 | } | ||
106 | del { text-decoration: line-through; } | ||
107 | em { font-style: italic; } | ||
108 | small { font-size: .9em; } | ||
109 | |||
110 | img { max-width: 100%} | ||
111 | |||
112 | |||
113 | /*** SIMPLE CLASSES ***/ | ||
114 | |||
115 | .center, .c { text-align: center; } | ||
116 | .nocenter{ text-align: left; } | ||
117 | |||
118 | .underline { text-decoration: underline; } | ||
119 | .nounderline { text-decoration: none; } | ||
120 | |||
121 | .no-bullet { list-style: none; } | ||
122 | .inline-list li { display: inline } | ||
123 | |||
124 | .netscape4, .no-display { display: none; } | ||
125 | |||
126 | |||
127 | /*** MANUAL PAGES ***/ | ||
128 | |||
129 | /* This makes the very long tables of contents in Gnulib and other | ||
130 | manuals easier to read. */ | ||
131 | .contents ul, .shortcontents ul { font-weight: bold; } | ||
132 | .contents ul ul, .shortcontents ul ul { font-weight: normal; } | ||
133 | .contents ul { list-style: none; } | ||
134 | |||
135 | /* For colored navigation bars (Emacs manual): make the bar extend | ||
136 | across the whole width of the page and give it a decent height. */ | ||
137 | .header, .node { margin: 0 -1em; padding: 0 1em; } | ||
138 | .header p, .node p { line-height: 2em; } | ||
139 | |||
140 | /* For navigation links */ | ||
141 | .node a, .header a { display: inline-block; line-height: 2em; } | ||
142 | .node a:hover, .header a:hover { background: #f2efe4; } | ||
143 | |||
144 | /* Inserts */ | ||
145 | table.cartouche td { padding: 1.5em; } | ||
146 | |||
147 | div.display, div.lisp, div.smalldisplay, | ||
148 | div.smallexample, div.smalllisp { margin-left: 3%; } | ||
149 | |||
150 | div.example { padding: .8em 1.2em .4em; } | ||
151 | pre.example { padding: .8em 1.2em; } | ||
152 | div.example, pre.example { | ||
153 | margin: 1em 0 1em 3% ; | ||
154 | -webkit-border-radius: .3em; | ||
155 | -moz-border-radius: .3em; | ||
156 | border-radius: .3em; | ||
157 | border: 1px solid #d4cbb6; | ||
158 | background-color: #f2efe4; | ||
159 | } | ||
160 | div.example > pre.example { | ||
161 | padding: 0 0 .4em; | ||
162 | margin: 0; | ||
163 | border: none; | ||
164 | } | ||
165 | |||
166 | pre.menu-comment { padding-top: 1.3em; margin: 0; } | ||
167 | |||
168 | |||
169 | /*** FOR WIDE SCREENS ***/ | ||
170 | |||
171 | @media (min-width: 40em) { | ||
172 | body { padding: .5em 3em 1em 3em; } | ||
173 | div.header, div.node { margin: 0 -3em; padding: 0 3em; } | ||
174 | } | ||
diff --git a/doc/old/tutorial/tutorial.texi b/doc/old/tutorial/tutorial.texi new file mode 100644 index 000000000..f849e116a --- /dev/null +++ b/doc/old/tutorial/tutorial.texi | |||
@@ -0,0 +1,1568 @@ | |||
1 | \input texinfo | ||
2 | |||
3 | @setfilename gnunet-tutorial.info | ||
4 | @documentencoding UTF-8 | ||
5 | @settitle GNUnet Tutorial | ||
6 | @c @exampleindent 2 | ||
7 | |||
8 | |||
9 | @include version.texi | ||
10 | |||
11 | @copying | ||
12 | Copyright @copyright{} 2001-2018 GNUnet e.V. | ||
13 | |||
14 | Permission is granted to copy, distribute and/or modify this document | ||
15 | under the terms of the GNU Free Documentation License, Version 1.3 or | ||
16 | any later version published by the Free Software Foundation; with no | ||
17 | Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A | ||
18 | copy of the license is included in the section entitled ``GNU Free | ||
19 | Documentation License''. | ||
20 | |||
21 | A copy of the license is also available from the Free Software | ||
22 | Foundation Web site at @url{http://www.gnu.org/licenses/fdl.html}. | ||
23 | |||
24 | Alternately, this document is also available under the General | ||
25 | Public License, version 3 or later, as published by the Free Software | ||
26 | Foundation. A copy of the license is included in the section entitled | ||
27 | ``GNU General Public License''. | ||
28 | |||
29 | A copy of the license is also available from the Free Software | ||
30 | Foundation Web site at @url{http://www.gnu.org/licenses/gpl.html}. | ||
31 | @end copying | ||
32 | |||
33 | @dircategory Tutorial | ||
34 | @direntry | ||
35 | * GNUnet-Tutorial: (gnunet-tutorial). C Tutorial for GNunet | ||
36 | @end direntry | ||
37 | |||
38 | |||
39 | @titlepage | ||
40 | @title GNUnet C Tutorial | ||
41 | @subtitle A Tutorial for GNUnet @value{VERSION} (C version) | ||
42 | @author The GNUnet Developers | ||
43 | |||
44 | @page | ||
45 | @vskip 0pt plus 1filll | ||
46 | |||
47 | @insertcopying | ||
48 | @end titlepage | ||
49 | |||
50 | @contents | ||
51 | |||
52 | @c **** TODO | ||
53 | @c 1. Update content? | ||
54 | @c 2. Either reference main documentation or | ||
55 | @c 3. Merge this into main documentation | ||
56 | |||
57 | @node Top | ||
58 | @top Introduction | ||
59 | |||
60 | This tutorials explains how to install GNUnet on a | ||
61 | GNU/Linux system and gives an introduction on how | ||
62 | GNUnet can be used to develop a Peer-to-Peer application. | ||
63 | Detailed installation instructions for | ||
64 | various operating systems and a detailed list of all | ||
65 | dependencies can be found on our website at | ||
66 | @uref{https://docs.gnunet.org/#Installation} and in our | ||
67 | Reference Documentation (GNUnet Handbook). | ||
68 | |||
69 | Please read this tutorial carefully since every single step is | ||
70 | important, and do not hesitate to contact the GNUnet team if you have | ||
71 | any questions or problems! Visit this link in your webbrowser to learn | ||
72 | how to contact the GNUnet team: | ||
73 | @uref{https://gnunet.org/en/contact.html} | ||
74 | |||
75 | @menu | ||
76 | |||
77 | * Installing GNUnet:: Installing GNUnet | ||
78 | * Introduction to GNUnet Architecture:: Introduction to GNUnet Architecture | ||
79 | * First Steps with GNUnet:: First Steps with GNUnet | ||
80 | * Developing Applications:: Developing Applications | ||
81 | * GNU Free Documentation License:: The license of this manual | ||
82 | |||
83 | @detailmenu | ||
84 | --- The Detailed Node Listing --- | ||
85 | |||
86 | Installing GNUnet | ||
87 | |||
88 | * Obtaining a stable version:: | ||
89 | * Installing Build Tool Chain and Dependencies:: | ||
90 | * Obtaining the latest version from Git:: | ||
91 | * Compiling and Installing GNUnet:: | ||
92 | * Common Issues - Check your GNUnet installation:: | ||
93 | |||
94 | Introduction to GNUnet Architecture | ||
95 | |||
96 | First Steps with GNUnet | ||
97 | |||
98 | * Configure your peer:: | ||
99 | * Start a peer:: | ||
100 | * Monitor a peer:: | ||
101 | * Starting Two Peers by Hand:: | ||
102 | * Starting Peers Using the Testbed Service:: | ||
103 | |||
104 | Developing Applications | ||
105 | |||
106 | * gnunet-ext:: | ||
107 | * Adapting the Template:: | ||
108 | * Writing a Client Application:: | ||
109 | * Writing a Service:: | ||
110 | * Interacting directly with other Peers using the CORE Service:: | ||
111 | * Storing peer-specific data using the PEERSTORE service:: | ||
112 | * Using the DHT:: | ||
113 | * Debugging with gnunet-arm:: | ||
114 | |||
115 | @end detailmenu | ||
116 | @end menu | ||
117 | |||
118 | @node Installing GNUnet | ||
119 | @chapter Installing GNUnet | ||
120 | |||
121 | First of all you have to install a current version of GNUnet. | ||
122 | You can download a tarball of a stable version from GNU FTP mirrors | ||
123 | or obtain the latest development version from our Git repository. | ||
124 | |||
125 | Most of the time you should prefer to download the stable version | ||
126 | since with the latest development version things can be broken, | ||
127 | functionality can be changed or tests can fail. You should only use | ||
128 | the development version if you know that you require a certain | ||
129 | feature or a certain issue has been fixed since the last release. | ||
130 | |||
131 | @menu | ||
132 | * Obtaining a stable version:: | ||
133 | * Installing Build Tool Chain and Dependencies:: | ||
134 | * Obtaining the latest version from Git:: | ||
135 | * Compiling and Installing GNUnet:: | ||
136 | * Common Issues - Check your GNUnet installation:: | ||
137 | @end menu | ||
138 | |||
139 | @node Obtaining a stable version | ||
140 | @section Obtaining a stable version | ||
141 | |||
142 | Download the tarball from | ||
143 | @indicateurl{https://ftp.gnu.org/gnu/gnunet/gnunet-@value{VERSION}.tar.gz}. | ||
144 | |||
145 | Make sure to download the associated @file{.sig} file and to verify the | ||
146 | authenticity of the tarball against it, like this: | ||
147 | |||
148 | @example | ||
149 | $ wget https://ftp.gnu.org/gnu/gnunet/gnunet-@value{VERSION}.tar.gz.sig | ||
150 | $ gpg --verify-files gnunet-@value{VERSION}.tar.gz.sig | ||
151 | @end example | ||
152 | |||
153 | @noindent | ||
154 | If this command fails because you do not have the required public key, | ||
155 | then you need to run the following command to import it: | ||
156 | |||
157 | @example | ||
158 | $ gpg --keyserver keys.gnupg.net --recv-keys 48426C7E | ||
159 | @end example | ||
160 | |||
161 | @noindent | ||
162 | and rerun the @code{gpg --verify-files} command. | ||
163 | |||
164 | @b{Note:}@ | ||
165 | @b{The pub key to sign the 0.10.1 release has been | ||
166 | revoked}. You will get an error message stating that | ||
167 | @b{there is no known public key or that it has been revoked}. | ||
168 | The next release of GNUnet will have a valid signature | ||
169 | again. We are sorry for the inconvenience this causes. | ||
170 | Another possible source you could use is our | ||
171 | "gnunet" git repository which, since the change from SVN to git in 2016, | ||
172 | has mandatory signed commits by every developer. | ||
173 | |||
174 | After verifying the signature you can extract the tarball. | ||
175 | The resulting directory will be renamed to @file{gnunet}, which we will | ||
176 | be using in the remainder of this document to refer to the | ||
177 | root of the source directory. | ||
178 | |||
179 | @example | ||
180 | $ tar xvzf gnunet-@value{VERSION}.tar.gz | ||
181 | $ mv gnunet-@value{VERSION} gnunet | ||
182 | @end example | ||
183 | |||
184 | @c FIXME: This can be irritating for the reader - First we say git should | ||
185 | @c be avoid unless it is really required, and then we write this | ||
186 | @c paragraph: | ||
187 | @noindent | ||
188 | However, please note that stable versions can be very outdated. | ||
189 | As a developer you are @b{strongly} encouraged to use the version | ||
190 | from @uref{https://git.gnunet.org/, the git server}. | ||
191 | |||
192 | @node Installing Build Tool Chain and Dependencies | ||
193 | @section Installing Build Tool Chain and Dependencies | ||
194 | |||
195 | To successfully compile GNUnet, you need the tools to build GNUnet and | ||
196 | the required dependencies. Please take a look at the | ||
197 | GNUnet Reference Documentation | ||
198 | (@pxref{Dependencies, The GNUnet Reference Documentation,, gnunet, The GNUnet Reference Documentation}) | ||
199 | for a list of required dependencies and | ||
200 | (@pxref{Generic installation instructions, The GNUnet Reference Documentation,, gnunet, The GNUnet Reference Documentation}) | ||
201 | read its Installation chapter for specific instructions for | ||
202 | your Operating System. | ||
203 | Please check the notes at the end of the configure process about | ||
204 | required dependencies. | ||
205 | |||
206 | For GNUnet bootstrapping support and the HTTP(S) plugin you should | ||
207 | install @uref{https://gnunet.org/en/gnurl.html, libgnurl}. | ||
208 | For the filesharing service you should install at least one of the | ||
209 | datastore backends (MySQL, SQlite and PostgreSQL are supported). | ||
210 | |||
211 | @node Obtaining the latest version from Git | ||
212 | @section Obtaining the latest version from Git | ||
213 | |||
214 | The latest development version can be obtained from our Git repository. | ||
215 | To get the code you need to have @code{Git} installed. Usually your | ||
216 | Operating System package manager should provide a suitable distribution | ||
217 | of git (otherwise check out Guix or Nix). If you are using an Operating | ||
218 | System based on Debian's apt: | ||
219 | |||
220 | @example | ||
221 | $ sudo apt-get install git | ||
222 | @end example | ||
223 | |||
224 | This is required for obtaining the repository, which is achieved with | ||
225 | the following command: | ||
226 | |||
227 | @example | ||
228 | $ git clone https://git.gnunet.org/gnunet.git | ||
229 | @end example | ||
230 | |||
231 | @noindent | ||
232 | After cloning the repository, you have to execute the @file{bootstrap} | ||
233 | script in the new directory: | ||
234 | |||
235 | @example | ||
236 | $ cd gnunet | ||
237 | $ ./bootstrap | ||
238 | @end example | ||
239 | |||
240 | @noindent | ||
241 | The remainder of this tutorial will assume that you have the | ||
242 | Git branch ``master'' checked out. | ||
243 | |||
244 | @node Compiling and Installing GNUnet | ||
245 | @section Compiling and Installing GNUnet | ||
246 | |||
247 | Note: This section is a duplication of the more in depth | ||
248 | @pxref{GNUnet Installation Handbook, The GNUnet Reference Documentation,, gnunet, The GNUnet Reference Documentation}. | ||
249 | |||
250 | First, you need to install libgnupgerror 1.27 (or later) and | ||
251 | libgcrypt 1.7.6 (or later): | ||
252 | |||
253 | @example | ||
254 | $ export GNUPGFTP="https://www.gnupg.org/ftp/gcrypt" | ||
255 | $ wget $GNUPGFTP/libgpg-error/libgpg-error-1.27.tar.bz2 | ||
256 | $ tar xf libgpg-error-1.27.tar.bz2 | ||
257 | $ cd libgpg-error-1.27 | ||
258 | $ ./configure | ||
259 | $ make | ||
260 | $ sudo make install | ||
261 | $ cd .. | ||
262 | @end example | ||
263 | |||
264 | @example | ||
265 | $ export GNUPGFTP="https://www.gnupg.org/ftp/gcrypt" | ||
266 | $ wget $GNUPGFTP/libgcrypt/libgcrypt-1.7.6.tar.bz2 | ||
267 | $ tar xf libgcrypt-1.7.6.tar.bz2 | ||
268 | $ cd libgcrypt-1.7.6 | ||
269 | $ ./configure | ||
270 | $ make | ||
271 | $ sudo make install | ||
272 | $ cd .. | ||
273 | @end example | ||
274 | |||
275 | @menu | ||
276 | * Installation:: | ||
277 | @end menu | ||
278 | |||
279 | @node Installation | ||
280 | @subsection Installation | ||
281 | Assuming all dependencies are installed, the following commands will | ||
282 | compile and install GNUnet in your home directory. You can specify the | ||
283 | directory where GNUnet will be installed by changing the | ||
284 | @code{--prefix} value when calling @command{./configure}. If | ||
285 | you do not specify a prefix, GNUnet is installed in the directory | ||
286 | @file{/usr/local}. When developing new applications you may want | ||
287 | to enable verbose logging by adding @code{--enable-logging=verbose}: | ||
288 | |||
289 | @example | ||
290 | $ export PREFIX=$HOME | ||
291 | $ ./configure --prefix=$PREFIX --enable-logging | ||
292 | $ make | ||
293 | $ make install | ||
294 | @end example | ||
295 | |||
296 | @noindent | ||
297 | After installing GNUnet you have to add your GNUnet installation | ||
298 | to your path environmental variable. In addition you have to | ||
299 | create the @file{.config} directory in your home directory | ||
300 | (unless it already exists) where GNUnet stores its data and an | ||
301 | empty GNUnet configuration file: | ||
302 | |||
303 | @example | ||
304 | $ export PATH=$PATH:$PREFIX/bin | ||
305 | $ echo export PATH=$PREFIX/bin:\\$PATH >> ~/.bashrc | ||
306 | $ mkdir ~/.config/ | ||
307 | $ touch ~/.config/gnunet.conf | ||
308 | @end example | ||
309 | |||
310 | @node Common Issues - Check your GNUnet installation | ||
311 | @section Common Issues - Check your GNUnet installation | ||
312 | |||
313 | You should check your installation to ensure that installing GNUnet | ||
314 | was successful up to this point. You should be able to access GNUnet's | ||
315 | binaries and run GNUnet's self check. | ||
316 | |||
317 | @example | ||
318 | $ which gnunet-arm | ||
319 | $PREFIX/bin/gnunet-arm | ||
320 | @end example | ||
321 | |||
322 | @noindent | ||
323 | should return $PREFIX/bin/gnunet-arm (where $PREFIX is the location | ||
324 | you have set earlier). It should be located in your | ||
325 | GNUnet installation and the output should not be empty. | ||
326 | |||
327 | If you see an output like: | ||
328 | |||
329 | @example | ||
330 | $ which gnunet-arm | ||
331 | @end example | ||
332 | |||
333 | @noindent | ||
334 | check your PATH variable to ensure GNUnet's @file{bin} directory is | ||
335 | included. | ||
336 | |||
337 | GNUnet provides tests for all of its subcomponents. Assuming you have | ||
338 | successfully built GNUnet, run | ||
339 | |||
340 | @example | ||
341 | $ cd gnunet | ||
342 | $ make check | ||
343 | @end example | ||
344 | |||
345 | @noindent | ||
346 | to execute tests for all components. @command{make check} traverses all | ||
347 | subdirectories in @file{src}. For every subdirectory you should | ||
348 | get a message like this: | ||
349 | |||
350 | @example | ||
351 | make[2]: Entering directory `/home/$USER/gnunet/contrib' | ||
352 | PASS: test_gnunet_prefix | ||
353 | ============= | ||
354 | 1 test passed | ||
355 | ============= | ||
356 | @end example | ||
357 | |||
358 | @node Introduction to GNUnet Architecture | ||
359 | @chapter Introduction to GNUnet Architecture | ||
360 | |||
361 | GNUnet is organized in layers and services. Each service is composed of a | ||
362 | main service implementation and a client library for other programs to use | ||
363 | the service's functionality, described by an API. | ||
364 | @c This approach is shown in | ||
365 | @c FIXME: enable this once the commented block below works: | ||
366 | @c figure~\ref fig:service. | ||
367 | Some services provide an additional command line tool to enable the user | ||
368 | to interact with the service. | ||
369 | |||
370 | Very often it is other GNUnet services that will use these APIs to build | ||
371 | the higher layers of GNUnet on top of the lower ones. Each layer expands | ||
372 | or extends the functionality of the service below (for instance, to build | ||
373 | a mesh on top of a DHT). | ||
374 | @c FXIME: See comment above. | ||
375 | @c See figure ~\ref fig:interaction for an illustration of this approach. | ||
376 | |||
377 | @c ** @image filename[, width[, height[, alttext[, extension]]]] | ||
378 | @c FIXME: Texlive (?) 20112 makes the assumption that this means | ||
379 | @c 'images/OBJECTNAME.txt' but later versions of it (2017) use this | ||
380 | @c syntax as described below. | ||
381 | @c TODO: Checkout the makedoc script Guile uses. | ||
382 | |||
383 | @c FIXME!!! | ||
384 | @c @image{images/gnunet-tutorial-service,,5in,Service with API and network protocol,.png} | ||
385 | @c @image{images/gnunet-tutorial-system,,5in,The layered system architecture of GNUnet,.png} | ||
386 | |||
387 | @c \begin{figure}[!h] | ||
388 | @c \begin{center} | ||
389 | @c % \begin{subfigure} | ||
390 | @c \begin{subfigure}[b]{0.3\textwidth} | ||
391 | @c \centering | ||
392 | @c \includegraphics[width=\textwidth]{figs/Service.pdf} | ||
393 | @c \caption{Service with API and network protocol} | ||
394 | @c \label{fig:service} | ||
395 | @c \end{subfigure} | ||
396 | @c ~~~~~~~~~~ | ||
397 | @c \begin{subfigure}[b]{0.3\textwidth} | ||
398 | @c \centering | ||
399 | @c \includegraphics[width=\textwidth]{figs/System.pdf} | ||
400 | @c \caption{Service interaction} | ||
401 | @c \label{fig:interaction} | ||
402 | @c \end{subfigure} | ||
403 | @c \end{center} | ||
404 | @c \caption{GNUnet's layered system architecture} | ||
405 | @c \end{figure} | ||
406 | |||
407 | The main service implementation runs as a standalone process in the | ||
408 | Operating System and the client code runs as part of the client program, | ||
409 | so crashes of a client do not affect the service process or other clients. | ||
410 | The service and the clients communicate via a message protocol to be | ||
411 | defined and implemented by the programmer. | ||
412 | |||
413 | @node First Steps with GNUnet | ||
414 | @chapter First Steps with GNUnet | ||
415 | |||
416 | @menu | ||
417 | * Configure your peer:: | ||
418 | * Start a peer:: | ||
419 | * Monitor a peer:: | ||
420 | * Starting Two Peers by Hand:: | ||
421 | * Starting Peers Using the Testbed Service:: | ||
422 | @end menu | ||
423 | |||
424 | @node Configure your peer | ||
425 | @section Configure your peer | ||
426 | |||
427 | First of all we need to configure your peer. Each peer is started with | ||
428 | a configuration containing settings for GNUnet itself and its services. | ||
429 | This configuration is based on the default configuration shipped with | ||
430 | GNUnet and can be modified. The default configuration is located in the | ||
431 | @file{$PREFIX/share/gnunet/config.d} directory. When starting a peer, you | ||
432 | can specify a customized configuration using the the @command{-c} command | ||
433 | line switch when starting the ARM service and all other services. When | ||
434 | using a modified configuration the default values are loaded and only | ||
435 | values specified in the configuration file will replace the default | ||
436 | values. | ||
437 | |||
438 | Since we want to start additional peers later, we need some modifications | ||
439 | from the default configuration. We need to create a separate service | ||
440 | home and a file containing our modifications for this peer: | ||
441 | |||
442 | @example | ||
443 | $ mkdir ~/gnunet1/ | ||
444 | $ touch peer1.conf | ||
445 | @end example | ||
446 | |||
447 | @noindent | ||
448 | Now add the following lines to @file{peer1.conf} to use this directory. | ||
449 | For simplified usage we want to prevent the peer to connect to the GNUnet | ||
450 | network since this could lead to confusing output. This modifications | ||
451 | will replace the default settings: | ||
452 | |||
453 | @example | ||
454 | [PATHS] | ||
455 | # Use this directory to store GNUnet data | ||
456 | GNUNET_HOME = ~/gnunet1/ | ||
457 | [hostlist] | ||
458 | # prevent bootstrapping | ||
459 | SERVERS = | ||
460 | @end example | ||
461 | |||
462 | @node Start a peer | ||
463 | @section Start a peer | ||
464 | Each GNUnet instance (called peer) has an identity (peer ID) based on a | ||
465 | cryptographic public private key pair. The peer ID is the printable hash | ||
466 | of the public key. | ||
467 | |||
468 | GNUnet services are controlled by a master service, the so called | ||
469 | @dfn{Automatic Restart Manager} (ARM). ARM starts, stops and even | ||
470 | restarts services automatically or on demand when a client connects. | ||
471 | You interact with the ARM service using the @command{gnunet-arm} tool. | ||
472 | GNUnet can then be started with @command{gnunet-arm -s} and stopped with | ||
473 | @command{gnunet-arm -e}. An additional service not automatically started | ||
474 | can be started using @command{gnunet-arm -i <service name>} and stopped | ||
475 | using @command{gnunet-arm -k <servicename>}. | ||
476 | |||
477 | Once you have started your peer, you can use many other GNUnet commands | ||
478 | to interact with it. For example, you can run: | ||
479 | |||
480 | @example | ||
481 | $ gnunet-peerinfo -s | ||
482 | @end example | ||
483 | |||
484 | @noindent | ||
485 | to obtain the public key of your peer. | ||
486 | |||
487 | You should see an output containing the peer ID similar to: | ||
488 | |||
489 | @example | ||
490 | I am peer `0PA02UVRKQTS2C .. JL5Q78F6H0B1ACPV1CJI59MEQUMQCC5G'. | ||
491 | @end example | ||
492 | |||
493 | @node Monitor a peer | ||
494 | @section Monitor a peer | ||
495 | |||
496 | In this section, we will monitor the behaviour of our peer's DHT | ||
497 | service with respect to a specific key. First we will start | ||
498 | GNUnet and then start the DHT service and use the DHT monitor tool | ||
499 | to monitor the PUT and GET commands we issue ussing the | ||
500 | @command{gnunet-dht-put} and @command{gnunet-dht-get} commands. | ||
501 | Using the ``monitor'' line given below, you can observe the behavior | ||
502 | of your own peer's DHT with respect to the specified KEY: | ||
503 | |||
504 | @example | ||
505 | # start gnunet with all default services: | ||
506 | $ gnunet-arm -c ~/peer1.conf -s | ||
507 | # start DHT service: | ||
508 | $ gnunet-arm -c ~/peer1.conf -i dht | ||
509 | $ cd ~/gnunet/src/dht; | ||
510 | $ ./gnunet-dht-monitor -c ~/peer1.conf -k KEY | ||
511 | @end example | ||
512 | |||
513 | @noindent | ||
514 | Now open a separate terminal and change again to | ||
515 | the @file{gnunet/src/dht} directory: | ||
516 | |||
517 | @example | ||
518 | $ cd ~/gnunet/src/dht | ||
519 | # put VALUE under KEY in the DHT: | ||
520 | $ ./gnunet-dht-put -c ~/peer1.conf -k KEY -d VALUE | ||
521 | # get key KEY from the DHT: | ||
522 | $ ./gnunet/src/dht/gnunet-dht-get -c ~/peer1.conf -k KEY | ||
523 | # print statistics about current GNUnet state: | ||
524 | $ gnunet-statistics -c ~/peer1.conf | ||
525 | # print statistics about DHT service: | ||
526 | $ gnunet-statistics -c ~/peer1.conf -s dht | ||
527 | @end example | ||
528 | |||
529 | @node Starting Two Peers by Hand | ||
530 | @section Starting Two Peers by Hand | ||
531 | |||
532 | This section describes how to start two peers on the same machine by hand. | ||
533 | The process is rather painful, but the description is somewhat | ||
534 | instructive. In practice, you might prefer the automated method | ||
535 | (@pxref{Starting Peers Using the Testbed Service}). | ||
536 | |||
537 | @menu | ||
538 | * Setup a second peer:: | ||
539 | * Start the second peer and connect the peers:: | ||
540 | * How to connect manually:: | ||
541 | @end menu | ||
542 | |||
543 | @node Setup a second peer | ||
544 | @subsection Setup a second peer | ||
545 | We will now start a second peer on your machine. | ||
546 | For the second peer, you will need to manually create a modified | ||
547 | configuration file to avoid conflicts with ports and directories. | ||
548 | A peers configuration file is by default located | ||
549 | in @file{~/.gnunet/gnunet.conf}. This file is typically very short | ||
550 | or even empty as only the differences to the defaults need to be | ||
551 | specified. The defaults are located in many files in the | ||
552 | @file{$PREFIX/share/gnunet/config.d} directory. | ||
553 | |||
554 | To configure the second peer, use the files | ||
555 | @file{$PREFIX/share/gnunet/config.d} as a template for your main | ||
556 | configuration file: | ||
557 | |||
558 | @example | ||
559 | $ cat $PREFIX/share/gnunet/config.d/*.conf > peer2.conf | ||
560 | @end example | ||
561 | |||
562 | @noindent | ||
563 | Now you have to edit @file{peer2.conf} and change: | ||
564 | |||
565 | @itemize | ||
566 | @item @code{GNUNET\_TEST\_HOME} under @code{PATHS} | ||
567 | @item Every (uncommented) value for ``@code{PORT}'' (add 10000) in any | ||
568 | section (the option may be commented out if @code{PORT} is | ||
569 | prefixed by "\#", in this case, UNIX domain sockets are used | ||
570 | and the PORT option does not need to be touched) | ||
571 | @item Every value for ``@code{UNIXPATH}'' in any section | ||
572 | (e.g. by adding a "-p2" suffix) | ||
573 | @end itemize | ||
574 | |||
575 | to a fresh, unique value. Make sure that the PORT numbers stay | ||
576 | below 65536. From now on, whenever you interact with the second peer, | ||
577 | you need to specify @command{-c peer2.conf} as an additional | ||
578 | command line argument. | ||
579 | |||
580 | Now, generate the 2nd peer's private key: | ||
581 | |||
582 | @example | ||
583 | $ gnunet-peerinfo -s -c peer2.conf | ||
584 | @end example | ||
585 | |||
586 | @noindent | ||
587 | This may take a while, generate entropy using your keyboard or mouse | ||
588 | as needed. Also, make sure the output is different from the | ||
589 | gnunet-peerinfo output for the first peer (otherwise you made an | ||
590 | error in the configuration). | ||
591 | |||
592 | @node Start the second peer and connect the peers | ||
593 | @subsection Start the second peer and connect the peers | ||
594 | |||
595 | Then, you can start a second peer using: | ||
596 | |||
597 | @example | ||
598 | $ gnunet-arm -c peer2.conf -s | ||
599 | $ gnunet-arm -c peer2.conf -i dht | ||
600 | $ ~/gnunet/src/dht/gnunet-dht-put -c peer2.conf -k KEY -d VALUE | ||
601 | $ ~/gnunet/src/dht/gnunet-dht-get -c peer2.conf -k KEY | ||
602 | @end example | ||
603 | |||
604 | If you want the two peers to connect, you have multiple options: | ||
605 | |||
606 | @itemize | ||
607 | @item UDP neighbour discovery (automatic) | ||
608 | @item Setup a bootstrap server | ||
609 | @item Connect manually | ||
610 | @end itemize | ||
611 | |||
612 | To setup peer 1 as bootstrapping server change the configuration of | ||
613 | the first one to be a hostlist server by adding the following lines to | ||
614 | @file{peer1.conf} to enable bootstrapping server: | ||
615 | |||
616 | @example | ||
617 | [hostlist] | ||
618 | OPTIONS = -p | ||
619 | @end example | ||
620 | |||
621 | @noindent | ||
622 | Then change @file{peer2.conf} and replace the ``@code{SERVERS}'' | ||
623 | line in the ``@code{[hostlist]}'' section with | ||
624 | ``@code{http://localhost:8080/}''. Restart both peers using: | ||
625 | |||
626 | @example | ||
627 | # stop first peer | ||
628 | $ gnunet-arm -c peer1.conf -e | ||
629 | # start first peer | ||
630 | $ gnunet-arm -c peer1.conf -s | ||
631 | # start second peer | ||
632 | $ gnunet-arm -c peer2.conf -s | ||
633 | @end example | ||
634 | |||
635 | @noindent | ||
636 | Note that if you start your peers without changing these settings, they | ||
637 | will use the ``global'' hostlist servers of the GNUnet P2P network and | ||
638 | likely connect to those peers. At that point, debugging might become | ||
639 | tricky as you're going to be connected to many more peers and would | ||
640 | likely observe traffic and behaviors that are not explicitly controlled | ||
641 | by you. | ||
642 | |||
643 | @node How to connect manually | ||
644 | @subsection How to connect manually | ||
645 | |||
646 | If you want to use the @code{peerinfo} tool to connect your | ||
647 | peers, you should: | ||
648 | |||
649 | @itemize | ||
650 | @item Set @code{IMMEDIATE_START = NO} in section @code{hostlist} | ||
651 | (to not connect to the global GNUnet) | ||
652 | @item Start both peers running @command{gnunet-arm -c peer1.conf -s} | ||
653 | and @command{gnunet-arm -c peer2.conf -s} | ||
654 | @item Get @code{HELLO} message of the first peer running | ||
655 | @command{gnunet-peerinfo -c peer1.conf -g} | ||
656 | @item Give the output to the second peer by running | ||
657 | @command{gnunet-peerinfo -c peer2.conf -p '<output>'} | ||
658 | @end itemize | ||
659 | |||
660 | Check that they are connected using @command{gnunet-core -c peer1.conf}, | ||
661 | which should give you the other peer's peer identity: | ||
662 | |||
663 | @example | ||
664 | $ gnunet-core -c peer1.conf | ||
665 | Peer `9TVUCS8P5A7ILLBGO6 [...shortened...] 1KNBJ4NGCHP3JPVULDG' | ||
666 | @end example | ||
667 | |||
668 | @node Starting Peers Using the Testbed Service | ||
669 | @section Starting Peers Using the Testbed Service | ||
670 | @c \label{sec:testbed} | ||
671 | |||
672 | GNUnet's testbed service is used for testing scenarios where | ||
673 | a number of peers are to be started. The testbed can manage peers | ||
674 | on a single host or on multiple hosts in a distributed fashion. | ||
675 | On a single affordable computer, it should be possible to run | ||
676 | around tens of peers without drastically increasing the load on the | ||
677 | system. | ||
678 | |||
679 | The testbed service can be access through its API | ||
680 | @file{include/gnunet\_testbed\_service.h}. The API provides many | ||
681 | routines for managing a group of peers. It also provides a helper | ||
682 | function @code{GNUNET\_TESTBED\_test\_run()} to quickly setup a | ||
683 | minimalistic testing environment on a single host. | ||
684 | |||
685 | This function takes a configuration file which will be used as a | ||
686 | template configuration for the peers. The testbed takes care of | ||
687 | modifying relevant options in the peers' configuration such as | ||
688 | @code{SERVICEHOME}, @code{PORT}, @code{UNIXPATH} to unique values | ||
689 | so that peers run without running into conflicts. It also checks | ||
690 | and assigns the ports in configurations only if they are free. | ||
691 | |||
692 | Additionally, the testbed service also reads its options from the | ||
693 | same configuration file. Various available options and details | ||
694 | about them can be found in the testbed default configuration file | ||
695 | @file{src/testbed/testbed.conf}. | ||
696 | |||
697 | With the testbed API, a sample test case can be structured as follows: | ||
698 | |||
699 | @example | ||
700 | @verbatiminclude examples/testbed_test.c | ||
701 | @end example | ||
702 | |||
703 | @noindent | ||
704 | The source code for the above listing can be found at | ||
705 | @c FIXME: This is not the correct URL. Where is the file? | ||
706 | @uref{https://git.gnunet.org/gnunet.git/tree/doc/documentation/testbed_test.c} | ||
707 | or in the @file{doc/} folder of your repository check-out. | ||
708 | After installing GNUnet, the above source code can be compiled as: | ||
709 | |||
710 | @example | ||
711 | $ export CPPFLAGS="-I/path/to/gnunet/headers" | ||
712 | $ export LDFLAGS="-L/path/to/gnunet/libraries" | ||
713 | $ gcc $CPPFLAGS $LDFLAGS -o testbed-test testbed_test.c \ | ||
714 | -lgnunettestbed -lgnunetdht -lgnunetutil | ||
715 | # Generate (empty) configuration | ||
716 | $ touch template.conf | ||
717 | # run it (press CTRL-C to stop) | ||
718 | $ ./testbed-test | ||
719 | @end example | ||
720 | |||
721 | @noindent | ||
722 | The @code{CPPFLAGS} and @code{LDFLAGS} are necessary if GNUnet | ||
723 | is installed into a different directory other than @file{/usr/local}. | ||
724 | |||
725 | All of testbed API's peer management functions treat management | ||
726 | actions as operations and return operation handles. It is expected | ||
727 | that the operations begin immediately, but they may get delayed (to | ||
728 | balance out load on the system). The program using the API then has | ||
729 | to take care of marking the operation as ``done'' so that its | ||
730 | associated resources can be freed immediately and other waiting | ||
731 | operations can be executed. Operations will be canceled if they are | ||
732 | marked as ``done'' before their completion. | ||
733 | |||
734 | An operation is treated as completed when it succeeds or fails. | ||
735 | Completion of an operation is either conveyed as events through | ||
736 | @dfn{controller event callback} or through respective | ||
737 | @dfn{operation completion callbacks}. | ||
738 | In functions which support completion notification | ||
739 | through both controller event callback and operation | ||
740 | completion callback, first the controller event callback will be | ||
741 | called. If the operation is not marked as done in that callback | ||
742 | or if the callback is given as NULL when creating the operation, | ||
743 | the operation completion callback will be called. The API | ||
744 | documentation shows which event are to be expected in the | ||
745 | controller event notifications. It also documents any exceptional | ||
746 | behaviour. | ||
747 | |||
748 | Once the peers are started, test cases often need to connect | ||
749 | some of the peers' services. Normally, opening a connect to | ||
750 | a peer's service requires the peer's configuration. While using | ||
751 | testbed, the testbed automatically generates per-peer configuration. | ||
752 | Accessing those configurations directly through file system is | ||
753 | discouraged as their locations are dynamically created and will be | ||
754 | different among various runs of testbed. To make access to these | ||
755 | configurations easy, testbed API provides the function | ||
756 | @code{GNUNET\_TESTBED\_service\_connect()}. This function fetches | ||
757 | the configuration of a given peer and calls the @dfn{Connect Adapter}. | ||
758 | In the example code, it is the @code{dht\_ca}. A connect adapter is | ||
759 | expected to open the connection to the needed service by using the | ||
760 | provided configuration and return the created service connection handle. | ||
761 | Successful connection to the needed service is signaled through | ||
762 | @code{service\_connect\_comp\_cb}. | ||
763 | |||
764 | A dual to connect adapter is the @dfn{Disconnect Adapter}. This callback | ||
765 | is called after the connect adapter has been called when the operation | ||
766 | from @code{GNUNET\_TESTBED\_service\_connect()} is marked as ``done''. | ||
767 | It has to disconnect from the service with the provided service | ||
768 | handle (@code{op\_result}). | ||
769 | |||
770 | Exercise: Find out how many peers you can run on your system. | ||
771 | |||
772 | Exercise: Find out how to create a 2D torus topology by changing the | ||
773 | options in the configuration file. | ||
774 | @xref{Supported Topologies, The GNUnet Reference Documentation ,, gnunet, The GNUnet Reference Documentation}, | ||
775 | then use the DHT API to store and retrieve values in the network. | ||
776 | |||
777 | @node Developing Applications | ||
778 | @chapter Developing Applications | ||
779 | |||
780 | @menu | ||
781 | * gnunet-ext:: | ||
782 | * Adapting the Template:: | ||
783 | * Writing a Client Application:: | ||
784 | * Writing a Service:: | ||
785 | * Interacting directly with other Peers using the CORE Service:: | ||
786 | * Storing peer-specific data using the PEERSTORE service:: | ||
787 | * Using the DHT:: | ||
788 | * Debugging with gnunet-arm:: | ||
789 | @end menu | ||
790 | |||
791 | @node gnunet-ext | ||
792 | @section gnunet-ext | ||
793 | To develop a new peer-to-peer application or to extend GNUnet we provide | ||
794 | a template build system for writing GNUnet extensions in C. It can be | ||
795 | obtained as follows: | ||
796 | |||
797 | @example | ||
798 | $ git clone https://git.gnunet.org/gnunet-ext.git | ||
799 | $ cd gnunet-ext/ | ||
800 | $ ./bootstrap | ||
801 | $ ./configure --prefix=$PREFIX --with-gnunet=$PREFIX | ||
802 | $ make | ||
803 | $ make install | ||
804 | $ make check | ||
805 | @end example | ||
806 | |||
807 | @noindent | ||
808 | The GNUnet ext template includes examples and a working buildsystem | ||
809 | for a new GNUnet service. A common GNUnet service consists of the | ||
810 | following parts which will be discussed in detail in the remainder | ||
811 | of this document. The functionality of a GNUnet service is implemented in: | ||
812 | |||
813 | @itemize | ||
814 | @item the GNUnet service (gnunet-ext/src/ext/gnunet-service-ext.c) | ||
815 | @item the client API (gnunet-ext/src/ext/ext_api.c) | ||
816 | @item the client application using the service API | ||
817 | (gnunet-ext/src/ext/gnunet-ext.c) | ||
818 | @end itemize | ||
819 | |||
820 | The interfaces for these entities are defined in: | ||
821 | |||
822 | @itemize | ||
823 | @item client API interface (gnunet-ext/src/ext/ext.h) | ||
824 | @item the service interface (gnunet-ext/src/include/gnunet_service_SERVICE.h) | ||
825 | @item the P2P protocol (gnunet-ext/src/include/gnunet_protocols_ext.h) | ||
826 | @end itemize | ||
827 | |||
828 | |||
829 | In addition the ext systems provides: | ||
830 | |||
831 | @itemize | ||
832 | @item a test testing the API (gnunet-ext/src/ext/test_ext_api.c) | ||
833 | @item a configuration template for the service | ||
834 | (gnunet-ext/src/ext/ext.conf.in) | ||
835 | @end itemize | ||
836 | |||
837 | @node Adapting the Template | ||
838 | @section Adapting the Template | ||
839 | |||
840 | The first step for writing any extension with a new service is to | ||
841 | ensure that the @file{ext.conf.in} file contains entries for the | ||
842 | @code{UNIXPATH}, @code{PORT} and @code{BINARY} for the service in a | ||
843 | section named after the service. | ||
844 | |||
845 | If you want to adapt the template rename the @file{ext.conf.in} to | ||
846 | match your services name, you have to modify the @code{AC\_OUTPUT} | ||
847 | section in @file{configure.ac} in the @file{gnunet-ext} root. | ||
848 | |||
849 | @node Writing a Client Application | ||
850 | @section Writing a Client Application | ||
851 | |||
852 | When writing any client application (for example, a command-line | ||
853 | tool), the basic structure is to start with the | ||
854 | @code{GNUNET\_PROGRAM\_run} function. This function will parse | ||
855 | command-line options, setup the scheduler and then invoke the | ||
856 | @code{run} function (with the remaining non-option arguments) | ||
857 | and a handle to the parsed configuration (and the configuration | ||
858 | file name that was used, which is typically not needed): | ||
859 | |||
860 | @example | ||
861 | @verbatiminclude examples/001.c | ||
862 | @end example | ||
863 | |||
864 | @menu | ||
865 | * Handling command-line options:: | ||
866 | * Writing a Client Library:: | ||
867 | * Writing a user interface:: | ||
868 | @end menu | ||
869 | |||
870 | @node Handling command-line options | ||
871 | @subsection Handling command-line options | ||
872 | |||
873 | Options can then be added easily by adding global variables and | ||
874 | expanding the @code{options} array. For example, the following would | ||
875 | add a string-option and a binary flag (defaulting to @code{NULL} and | ||
876 | @code{GNUNET\_NO} respectively): | ||
877 | |||
878 | @example | ||
879 | @verbatiminclude examples/002.c | ||
880 | @end example | ||
881 | |||
882 | Issues such as displaying some helpful text describing options using | ||
883 | the @code{--help} argument and error handling are taken care of when | ||
884 | using this approach. Other @code{GNUNET\_GETOPT\_}-functions can be used | ||
885 | to obtain integer value options, increment counters, etc. You can | ||
886 | even write custom option parsers for special circumstances not covered | ||
887 | by the available handlers. To check if an argument was specified by the | ||
888 | user you initialize the variable with a specific value (e.g. NULL for | ||
889 | a string and GNUNET\_SYSERR for a integer) and check after parsing | ||
890 | happened if the values were modified. | ||
891 | |||
892 | Inside the @code{run} method, the program would perform the | ||
893 | application-specific logic, which typically involves initializing and | ||
894 | using some client library to interact with the service. The client | ||
895 | library is supposed to implement the IPC whereas the service provides | ||
896 | more persistent P2P functions. | ||
897 | |||
898 | Exercise: Add a few command-line options and print them inside | ||
899 | of @code{run}. What happens if the user gives invalid arguments? | ||
900 | |||
901 | @node Writing a Client Library | ||
902 | @subsection Writing a Client Library | ||
903 | |||
904 | The first and most important step in writing a client library is to | ||
905 | decide on an API for the library. Typical API calls include | ||
906 | connecting to the service, performing application-specific requests | ||
907 | and cleaning up. Many examples for such service APIs can be found | ||
908 | in the @file{gnunet/src/include/gnunet\_*\_service.h} files. | ||
909 | |||
910 | Then, a client-service protocol needs to be designed. This typically | ||
911 | involves defining various message formats in a header that will be | ||
912 | included by both the service and the client library (but is otherwise | ||
913 | not shared and hence located within the service's directory and not | ||
914 | installed by @command{make install}). Each message must start with a | ||
915 | @code{struct GNUNET\_MessageHeader} and must be shorter than 64k. By | ||
916 | convention, all fields in IPC (and P2P) messages must be in big-endian | ||
917 | format (and thus should be read using @code{ntohl} and similar | ||
918 | functions and written using @code{htonl} and similar functions). | ||
919 | Unique message types must be defined for each message struct in the | ||
920 | @file{gnunet\_protocols.h} header (or an extension-specific include | ||
921 | file). | ||
922 | |||
923 | @menu | ||
924 | * Connecting to the Service:: | ||
925 | * Sending messages:: | ||
926 | * Receiving Replies from the Service:: | ||
927 | @end menu | ||
928 | |||
929 | @node Connecting to the Service | ||
930 | @subsubsection Connecting to the Service | ||
931 | |||
932 | Before a client library can implement the application-specific protocol | ||
933 | with the service, a connection must be created: | ||
934 | |||
935 | @example | ||
936 | @verbatiminclude examples/003.c | ||
937 | @end example | ||
938 | |||
939 | @noindent | ||
940 | As a result a @code{GNUNET\_MQ\_Handle} is returned | ||
941 | which can to used henceforth to transmit messages to the service. | ||
942 | The complete MQ API can be found in @file{gnunet\_mq\_lib.h}. | ||
943 | The @code{handlers} array in the example above is incomplete. | ||
944 | Here is where you will define which messages you expect to | ||
945 | receive from the service, and which functions handle them. | ||
946 | The @code{error\_cb} is a function that is to be called whenever | ||
947 | there are errors communicating with the service. | ||
948 | |||
949 | @node Sending messages | ||
950 | @subsubsection Sending messages | ||
951 | |||
952 | In GNUnet, messages are always sent beginning with a | ||
953 | @code{struct GNUNET\_MessageHeader} in big endian format. | ||
954 | This header defines the size and the type of the | ||
955 | message, the payload follows after this header. | ||
956 | |||
957 | @example | ||
958 | @verbatiminclude examples/004.c | ||
959 | @end example | ||
960 | |||
961 | @noindent | ||
962 | Existing message types are defined in @file{gnunet\_protocols.h}. | ||
963 | A common way to create a message is with an envelope: | ||
964 | |||
965 | @example | ||
966 | @verbatiminclude examples/005.c | ||
967 | @end example | ||
968 | |||
969 | @noindent | ||
970 | Exercise: Define a message struct that includes a 32-bit | ||
971 | unsigned integer in addition to the standard GNUnet MessageHeader. | ||
972 | Add a C struct and define a fresh protocol number for your message. | ||
973 | Protocol numbers in gnunet-ext are defined | ||
974 | in @file{gnunet-ext/src/include/gnunet_protocols_ext.h} | ||
975 | |||
976 | Exercise: Find out how you can determine the number of messages | ||
977 | in a message queue. | ||
978 | |||
979 | Exercise: Find out how you can determine when a message you | ||
980 | have queued was actually transmitted. | ||
981 | |||
982 | Exercise: Define a helper function to transmit a 32-bit | ||
983 | unsigned integer (as payload) to a service using some given client | ||
984 | handle. | ||
985 | |||
986 | @node Receiving Replies from the Service | ||
987 | @subsubsection Receiving Replies from the Service | ||
988 | |||
989 | Clients can receive messages from the service using the handlers | ||
990 | specified in the @code{handlers} array we specified when connecting | ||
991 | to the service. Entries in the the array are usually created using | ||
992 | one of two macros, depending on whether the message is fixed size | ||
993 | or variable size. Variable size messages are managed using two | ||
994 | callbacks, one to check that the message is well-formed, the other | ||
995 | to actually process the message. Fixed size messages are fully | ||
996 | checked by the MQ-logic, and thus only need to provide the handler | ||
997 | to process the message. Note that the prefixes @code{check\_} | ||
998 | and @code{handle\_} are mandatory. | ||
999 | |||
1000 | @example | ||
1001 | @verbatiminclude examples/006.c | ||
1002 | @end example | ||
1003 | |||
1004 | @noindent | ||
1005 | Exercise: Expand your helper function to receive a response message | ||
1006 | (for example, containing just the @code{struct GNUnet MessageHeader} | ||
1007 | without any payload). Upon receiving the service's response, you | ||
1008 | should call a callback provided to your helper function's API. | ||
1009 | |||
1010 | Exercise: Figure out where you can pass values to the | ||
1011 | closures (@code{cls}). | ||
1012 | |||
1013 | @node Writing a user interface | ||
1014 | @subsection Writing a user interface | ||
1015 | |||
1016 | Given a client library, all it takes to access a service now is to | ||
1017 | combine calls to the client library with parsing command-line | ||
1018 | options. | ||
1019 | |||
1020 | Exercise: Call your client API from your @code{run()} method in your | ||
1021 | client application to send a request to the service. For example, | ||
1022 | send a 32-bit integer value based on a number given at the | ||
1023 | command-line to the service. | ||
1024 | |||
1025 | @node Writing a Service | ||
1026 | @section Writing a Service | ||
1027 | |||
1028 | Before you can test the client you've written so far, you'll | ||
1029 | need to also implement the corresponding service. | ||
1030 | |||
1031 | @menu | ||
1032 | * Code Placement:: | ||
1033 | * Starting a Service:: | ||
1034 | @end menu | ||
1035 | |||
1036 | @node Code Placement | ||
1037 | @subsection Code Placement | ||
1038 | |||
1039 | New services are placed in their own subdirectory under | ||
1040 | @file{gnunet/src}. This subdirectory should contain the API | ||
1041 | implementation file @file{SERVICE\_api.c}, the description of | ||
1042 | the client-service protocol @file{SERVICE.h} and P2P protocol | ||
1043 | @file{SERVICE\_protocol.h}, the implementation of the service itself | ||
1044 | @file{gnunet-service-SERVICE.h} and several files for tests, | ||
1045 | including test code and configuration files. | ||
1046 | |||
1047 | @node Starting a Service | ||
1048 | @subsection Starting a Service | ||
1049 | |||
1050 | The key API definition for creating a service is the | ||
1051 | @code{GNUNET\_SERVICE\_MAIN} macro: | ||
1052 | |||
1053 | @example | ||
1054 | @verbatiminclude examples/007.c | ||
1055 | @end example | ||
1056 | |||
1057 | @noindent | ||
1058 | In addition to the service name and flags, the macro takes three | ||
1059 | functions, typically called @code{run}, @code{client\_connect\_cb} and | ||
1060 | @code{client\_disconnect\_cb} as well as an array of message handlers | ||
1061 | that will be called for incoming messages from clients. | ||
1062 | |||
1063 | A minimal version of the three central service functions would look | ||
1064 | like this: | ||
1065 | |||
1066 | @example | ||
1067 | @verbatiminclude examples/008.c | ||
1068 | @end example | ||
1069 | |||
1070 | @noindent | ||
1071 | Exercise: Write a stub service that processes no messages at all | ||
1072 | in your code. Create a default configuration for it, integrate it | ||
1073 | with the build system and start the service from | ||
1074 | @command{gnunet-service-arm} using @command{gnunet-arm -i NAME}. | ||
1075 | |||
1076 | Exercise: Figure out how to set the closure (@code{cls}) for handlers | ||
1077 | of a service. | ||
1078 | |||
1079 | Exercise: Figure out how to send messages from the service back to the | ||
1080 | client. | ||
1081 | |||
1082 | Each handler function in the service @b{must} eventually (possibly in some | ||
1083 | asynchronous continuation) call | ||
1084 | @code{GNUNET\_SERVICE\_client\_continue()}. Only after this call | ||
1085 | additional messages from the same client may | ||
1086 | be processed. This way, the service can throttle processing messages | ||
1087 | from the same client. | ||
1088 | |||
1089 | Exercise: Change the service to ``handle'' the message from your | ||
1090 | client (for now, by printing a message). What happens if you | ||
1091 | forget to call @code{GNUNET\_SERVICE\_client\_continue()}? | ||
1092 | |||
1093 | @node Interacting directly with other Peers using the CORE Service | ||
1094 | @section Interacting directly with other Peers using the CORE Service | ||
1095 | |||
1096 | FIXME: This section still needs to be updated to the latest API! | ||
1097 | |||
1098 | One of the most important services in GNUnet is the @code{CORE} service | ||
1099 | managing connections between peers and handling encryption between peers. | ||
1100 | |||
1101 | One of the first things any service that extends the P2P protocol | ||
1102 | typically does is connect to the @code{CORE} service using: | ||
1103 | |||
1104 | @example | ||
1105 | @verbatiminclude examples/009.c | ||
1106 | @end example | ||
1107 | |||
1108 | @menu | ||
1109 | * New P2P connections:: | ||
1110 | * Receiving P2P Messages:: | ||
1111 | * Sending P2P Messages:: | ||
1112 | * End of P2P connections:: | ||
1113 | @end menu | ||
1114 | |||
1115 | @node New P2P connections | ||
1116 | @subsection New P2P connections | ||
1117 | |||
1118 | Before any traffic with a different peer can be exchanged, the peer must | ||
1119 | be known to the service. This is notified by the @code{CORE} | ||
1120 | @code{connects} callback, which communicates the identity of the new | ||
1121 | peer to the service: | ||
1122 | |||
1123 | @example | ||
1124 | @verbatiminclude examples/010.c | ||
1125 | @end example | ||
1126 | |||
1127 | @noindent | ||
1128 | Note that whatever you return from @code{connects} is given as the | ||
1129 | @code{cls} argument to the message handlers for messages from | ||
1130 | the respective peer. | ||
1131 | |||
1132 | Exercise: Create a service that connects to the @code{CORE}. Then | ||
1133 | start (and connect) two peers and print a message once your connect | ||
1134 | callback is invoked. | ||
1135 | |||
1136 | @node Receiving P2P Messages | ||
1137 | @subsection Receiving P2P Messages | ||
1138 | |||
1139 | To receive messages from @code{CORE}, you pass the desired | ||
1140 | @code{handlers} to the @code{GNUNET\_CORE\_connect()} function, | ||
1141 | just as we showed for services. | ||
1142 | |||
1143 | It is your responsibility to process messages fast enough or | ||
1144 | to implement flow control. If an application does not process | ||
1145 | CORE messages fast enough, CORE will randomly drop messages | ||
1146 | to not keep a very long queue in memory. | ||
1147 | |||
1148 | Exercise: Start one peer with a new service that has a message | ||
1149 | handler and start a second peer that only has your ``old'' service | ||
1150 | without message handlers. Which ``connect'' handlers are invoked when | ||
1151 | the two peers are connected? Why? | ||
1152 | |||
1153 | @node Sending P2P Messages | ||
1154 | @subsection Sending P2P Messages | ||
1155 | |||
1156 | You can transmit messages to other peers using the @code{mq} you were | ||
1157 | given during the @code{connect} callback. Note that the @code{mq} | ||
1158 | automatically is released upon @code{disconnect} and that you must | ||
1159 | not use it afterwards. | ||
1160 | |||
1161 | It is your responsibility to not over-fill the message queue, GNUnet | ||
1162 | will send the messages roughly in the order given as soon as possible. | ||
1163 | |||
1164 | Exercise: Write a service that upon connect sends messages as | ||
1165 | fast as possible to the other peer (the other peer should run a | ||
1166 | service that ``processes'' those messages). How fast is the | ||
1167 | transmission? Count using the STATISTICS service on both ends. Are | ||
1168 | messages lost? How can you transmit messages faster? What happens if | ||
1169 | you stop the peer that is receiving your messages? | ||
1170 | |||
1171 | @node End of P2P connections | ||
1172 | @subsection End of P2P connections | ||
1173 | |||
1174 | If a message handler returns @code{GNUNET\_SYSERR}, the remote | ||
1175 | peer shuts down or there is an unrecoverable network | ||
1176 | disconnection, CORE notifies the service that the peer disconnected. | ||
1177 | After this notification no more messages will be received from the | ||
1178 | peer and the service is no longer allowed to send messages to the peer. | ||
1179 | The disconnect callback looks like the following: | ||
1180 | |||
1181 | @example | ||
1182 | @verbatiminclude examples/011.c | ||
1183 | @end example | ||
1184 | |||
1185 | @noindent | ||
1186 | Exercise: Fix your service to handle peer disconnects. | ||
1187 | |||
1188 | @node Storing peer-specific data using the PEERSTORE service | ||
1189 | @section Storing peer-specific data using the PEERSTORE service | ||
1190 | |||
1191 | GNUnet's PEERSTORE service offers a persistorage for arbitrary | ||
1192 | peer-specific data. Other GNUnet services can use the PEERSTORE | ||
1193 | to store, retrieve and monitor data records. Each data record | ||
1194 | stored with PEERSTORE contains the following fields: | ||
1195 | |||
1196 | @itemize | ||
1197 | @item subsystem: Name of the subsystem responsible for the record. | ||
1198 | @item peerid: Identity of the peer this record is related to. | ||
1199 | @item key: a key string identifying the record. | ||
1200 | @item value: binary record value. | ||
1201 | @item expiry: record expiry date. | ||
1202 | @end itemize | ||
1203 | |||
1204 | The first step is to start a connection to the PEERSTORE service: | ||
1205 | @example | ||
1206 | @verbatiminclude examples/012.c | ||
1207 | @end example | ||
1208 | |||
1209 | The service handle @code{peerstore_handle} will be needed for | ||
1210 | all subsequent PEERSTORE operations. | ||
1211 | |||
1212 | @menu | ||
1213 | * Storing records:: | ||
1214 | * Retrieving records:: | ||
1215 | * Monitoring records:: | ||
1216 | * Disconnecting from PEERSTORE:: | ||
1217 | @end menu | ||
1218 | |||
1219 | @node Storing records | ||
1220 | @subsection Storing records | ||
1221 | |||
1222 | To store a new record, use the following function: | ||
1223 | |||
1224 | @example | ||
1225 | @verbatiminclude examples/013.c | ||
1226 | @end example | ||
1227 | |||
1228 | @noindent | ||
1229 | The @code{options} parameter can either be | ||
1230 | @code{GNUNET_PEERSTORE_STOREOPTION_MULTIPLE} which means that multiple | ||
1231 | values can be stored under the same key combination | ||
1232 | (subsystem, peerid, key), or @code{GNUNET_PEERSTORE_STOREOPTION_REPLACE} | ||
1233 | which means that PEERSTORE will replace any existing values under the | ||
1234 | given key combination (subsystem, peerid, key) with the new given value. | ||
1235 | |||
1236 | The continuation function @code{cont} will be called after the store | ||
1237 | request is successfully sent to the PEERSTORE service. This does not | ||
1238 | guarantee that the record is successfully stored, only that it was | ||
1239 | received by the service. | ||
1240 | |||
1241 | The @code{GNUNET_PEERSTORE_store} function returns a handle to the store | ||
1242 | operation. This handle can be used to cancel the store operation only | ||
1243 | before the continuation function is called: | ||
1244 | |||
1245 | @example | ||
1246 | @verbatiminclude examples/013.1.c | ||
1247 | @end example | ||
1248 | |||
1249 | @node Retrieving records | ||
1250 | @subsection Retrieving records | ||
1251 | |||
1252 | To retrieve stored records, use the following function: | ||
1253 | |||
1254 | @example | ||
1255 | @verbatiminclude examples/014.c | ||
1256 | @end example | ||
1257 | |||
1258 | @noindent | ||
1259 | The values of @code{peer} and @code{key} can be @code{NULL}. This | ||
1260 | allows the iteration over values stored under any of the following | ||
1261 | key combinations: | ||
1262 | |||
1263 | @itemize | ||
1264 | @item (subsystem) | ||
1265 | @item (subsystem, peerid) | ||
1266 | @item (subsystem, key) | ||
1267 | @item (subsystem, peerid, key) | ||
1268 | @end itemize | ||
1269 | |||
1270 | The @code{callback} function will be called once with each retrieved | ||
1271 | record and once more with a @code{NULL} record to signal the end of | ||
1272 | results. | ||
1273 | |||
1274 | The @code{GNUNET_PEERSTORE_iterate} function returns a handle to the | ||
1275 | iterate operation. This handle can be used to cancel the iterate | ||
1276 | operation only before the callback function is called with a | ||
1277 | @code{NULL} record. | ||
1278 | |||
1279 | @node Monitoring records | ||
1280 | @subsection Monitoring records | ||
1281 | |||
1282 | PEERSTORE offers the functionality of monitoring for new records | ||
1283 | stored under a specific key combination (subsystem, peerid, key). | ||
1284 | To start the monitoring, use the following function: | ||
1285 | |||
1286 | @example | ||
1287 | @verbatiminclude examples/015.c | ||
1288 | @end example | ||
1289 | |||
1290 | @noindent | ||
1291 | Whenever a new record is stored under the given key combination, | ||
1292 | the @code{callback} function will be called with this new | ||
1293 | record. This will continue until the connection to the PEERSTORE | ||
1294 | service is broken or the watch operation is canceled: | ||
1295 | |||
1296 | @example | ||
1297 | @verbatiminclude examples/016.c | ||
1298 | @end example | ||
1299 | |||
1300 | @node Disconnecting from PEERSTORE | ||
1301 | @subsection Disconnecting from PEERSTORE | ||
1302 | |||
1303 | When the connection to the PEERSTORE service is no longer needed, | ||
1304 | disconnect using the following function: | ||
1305 | |||
1306 | @example | ||
1307 | @verbatiminclude examples/017.c | ||
1308 | @end example | ||
1309 | |||
1310 | @noindent | ||
1311 | If the @code{sync_first} flag is set to @code{GNUNET_YES}, | ||
1312 | the API will delay the disconnection until all store requests | ||
1313 | are received by the PEERSTORE service. Otherwise, it will | ||
1314 | disconnect immediately. | ||
1315 | |||
1316 | @node Using the DHT | ||
1317 | @section Using the DHT | ||
1318 | |||
1319 | The DHT allows to store data so other peers in the P2P network can | ||
1320 | access it and retrieve data stored by any peers in the network. | ||
1321 | This section will explain how to use the DHT. Of course, the first | ||
1322 | thing to do is to connect to the DHT service: | ||
1323 | |||
1324 | @example | ||
1325 | @verbatiminclude examples/018.c | ||
1326 | @end example | ||
1327 | |||
1328 | @noindent | ||
1329 | The second parameter indicates how many requests in parallel to expect. | ||
1330 | It is not a hard limit, but a good approximation will make the DHT more | ||
1331 | efficient. | ||
1332 | |||
1333 | @menu | ||
1334 | * Storing data in the DHT:: | ||
1335 | * Obtaining data from the DHT:: | ||
1336 | * Implementing a block plugin:: | ||
1337 | * Monitoring the DHT:: | ||
1338 | @end menu | ||
1339 | |||
1340 | @node Storing data in the DHT | ||
1341 | @subsection Storing data in the DHT | ||
1342 | Since the DHT is a dynamic environment (peers join and leave frequently) | ||
1343 | the data that we put in the DHT does not stay there indefinitely. It is | ||
1344 | important to ``refresh'' the data periodically by simply storing it | ||
1345 | again, in order to make sure other peers can access it. | ||
1346 | |||
1347 | The put API call offers a callback to signal that the PUT request has been | ||
1348 | sent. This does not guarantee that the data is accessible to others peers, | ||
1349 | or even that is has been stored, only that the service has requested to | ||
1350 | a neighboring peer the retransmission of the PUT request towards its final | ||
1351 | destination. Currently there is no feedback about whether or not the data | ||
1352 | has been successfully stored or where it has been stored. In order to | ||
1353 | improve the availablilty of the data and to compensate for possible | ||
1354 | errors, peers leaving and other unfavorable events, just make several | ||
1355 | PUT requests! | ||
1356 | |||
1357 | @example | ||
1358 | @verbatiminclude examples/019.c | ||
1359 | @end example | ||
1360 | |||
1361 | @noindent | ||
1362 | Exercise: Store a value in the DHT periodically to make sure it | ||
1363 | is available over time. You might consider using the function | ||
1364 | @code{GNUNET\_SCHEDULER\_add\_delayed} and call | ||
1365 | @code{GNUNET\_DHT\_put} from inside a helper function. | ||
1366 | |||
1367 | @node Obtaining data from the DHT | ||
1368 | @subsection Obtaining data from the DHT | ||
1369 | |||
1370 | As we saw in the previous example, the DHT works in an asynchronous mode. | ||
1371 | Each request to the DHT is executed ``in the background'' and the API | ||
1372 | calls return immediately. In order to receive results from the DHT, the | ||
1373 | API provides a callback. Once started, the request runs in the service, | ||
1374 | the service will try to get as many results as possible (filtering out | ||
1375 | duplicates) until the timeout expires or we explicitly stop the request. | ||
1376 | It is possible to give a ``forever'' timeout with | ||
1377 | @code{GNUNET\_TIME\_UNIT\_FOREVER\_REL}. | ||
1378 | |||
1379 | If we give a route option @code{GNUNET\_DHT\_RO\_RECORD\_ROUTE} | ||
1380 | the callback will get a list of all the peers the data has travelled, | ||
1381 | both on the PUT path and on the GET path. | ||
1382 | |||
1383 | @example | ||
1384 | @verbatiminclude examples/020.c | ||
1385 | @end example | ||
1386 | |||
1387 | @noindent | ||
1388 | Exercise: Store a value in the DHT and after a while retrieve it. | ||
1389 | Show the IDs of all the peers the requests have gone through. | ||
1390 | In order to convert a peer ID to a string, use the function | ||
1391 | @code{GNUNET\_i2s}. Pay attention to the route option parameters | ||
1392 | in both calls! | ||
1393 | |||
1394 | @node Implementing a block plugin | ||
1395 | @subsection Implementing a block plugin | ||
1396 | |||
1397 | In order to store data in the DHT, it is necessary to provide a block | ||
1398 | plugin. The DHT uses the block plugin to ensure that only well-formed | ||
1399 | requests and replies are transmitted over the network. | ||
1400 | |||
1401 | The block plugin should be put in a file @file{plugin\_block\_SERVICE.c} | ||
1402 | in the service's respective directory. The | ||
1403 | mandatory functions that need to be implemented for a block plugin are | ||
1404 | described in the following sections. | ||
1405 | |||
1406 | @menu | ||
1407 | * Validating requests and replies:: | ||
1408 | * Deriving a key from a reply:: | ||
1409 | * Initialization of the plugin:: | ||
1410 | * Shutdown of the plugin:: | ||
1411 | * Integration of the plugin with the build system:: | ||
1412 | @end menu | ||
1413 | |||
1414 | @node Validating requests and replies | ||
1415 | @subsubsection Validating requests and replies | ||
1416 | |||
1417 | The evaluate function should validate a reply or a request. It returns | ||
1418 | a @code{GNUNET\_BLOCK\_EvaluationResult}, which is an enumeration. All | ||
1419 | possible answers are in @file{gnunet\_block\_lib.h}. The function will | ||
1420 | be called with a @code{reply\_block} argument of @code{NULL} for | ||
1421 | requests. Note that depending on how @code{evaluate} is called, only | ||
1422 | some of the possible return values are valid. The specific meaning of | ||
1423 | the @code{xquery} argument is application-specific. Applications that | ||
1424 | do not use an extended query should check that the @code{xquery\_size} | ||
1425 | is zero. The block group is typically used to filter duplicate | ||
1426 | replies. | ||
1427 | |||
1428 | @example | ||
1429 | @verbatiminclude examples/021.c | ||
1430 | @end example | ||
1431 | |||
1432 | @noindent | ||
1433 | Note that it is mandatory to detect duplicate replies in this function | ||
1434 | and return the respective status code. Duplicate detection is | ||
1435 | typically done using the Bloom filter block group provided by | ||
1436 | @file{libgnunetblockgroup.so}. Failure to do so may cause replies to | ||
1437 | circle in the network. | ||
1438 | |||
1439 | @node Deriving a key from a reply | ||
1440 | @subsubsection Deriving a key from a reply | ||
1441 | |||
1442 | The DHT can operate more efficiently if it is possible to derive a key | ||
1443 | from the value of the corresponding block. The @code{get\_key} | ||
1444 | function is used to obtain the key of a block --- for example, by | ||
1445 | means of hashing. If deriving the key is not possible, the function | ||
1446 | should simply return @code{GNUNET\_SYSERR} (the DHT will still work | ||
1447 | just fine with such blocks). | ||
1448 | |||
1449 | @example | ||
1450 | @verbatiminclude examples/022.c | ||
1451 | @end example | ||
1452 | |||
1453 | @node Initialization of the plugin | ||
1454 | @subsubsection Initialization of the plugin | ||
1455 | |||
1456 | The plugin is realized as a shared C library. The library must export | ||
1457 | an initialization function which should initialize the plugin. The | ||
1458 | initialization function specifies what block types the plugin cares | ||
1459 | about and returns a struct with the functions that are to be used for | ||
1460 | validation and obtaining keys (the ones just defined above). | ||
1461 | |||
1462 | @example | ||
1463 | @verbatiminclude examples/023.c | ||
1464 | @end example | ||
1465 | |||
1466 | @node Shutdown of the plugin | ||
1467 | @subsubsection Shutdown of the plugin | ||
1468 | |||
1469 | Following GNUnet's general plugin API concept, the plugin must | ||
1470 | export a second function for cleaning up. It usually does very | ||
1471 | little. | ||
1472 | |||
1473 | @example | ||
1474 | @verbatiminclude examples/024.c | ||
1475 | @end example | ||
1476 | |||
1477 | @node Integration of the plugin with the build system | ||
1478 | @subsubsection Integration of the plugin with the build system | ||
1479 | |||
1480 | In order to compile the plugin, the @file{Makefile.am} file for the | ||
1481 | service SERVICE should contain a rule similar to this: | ||
1482 | @c Actually this is a Makefile not C. But the whole structure of examples | ||
1483 | @c must be improved. | ||
1484 | |||
1485 | @example | ||
1486 | @verbatiminclude examples/025.Makefile.am | ||
1487 | @end example | ||
1488 | |||
1489 | @noindent | ||
1490 | Exercise: Write a block plugin that accepts all queries | ||
1491 | and all replies but prints information about queries and replies | ||
1492 | when the respective validation hooks are called. | ||
1493 | |||
1494 | @node Monitoring the DHT | ||
1495 | @subsection Monitoring the DHT | ||
1496 | |||
1497 | It is possible to monitor the functioning of the local | ||
1498 | DHT service. When monitoring the DHT, the service will | ||
1499 | alert the monitoring program of any events, both started | ||
1500 | locally or received for routing from another peer. | ||
1501 | The are three different types of events possible: a | ||
1502 | GET request, a PUT request or a response (a reply to a GET). | ||
1503 | |||
1504 | Since the different events have different associated data, | ||
1505 | the API gets 3 different callbacks (one for each message type) | ||
1506 | and optional type and key parameters, to allow for filtering of | ||
1507 | messages. When an event happens, the appropriate callback is | ||
1508 | called with all the information about the event. | ||
1509 | |||
1510 | @example | ||
1511 | @verbatiminclude examples/026.c | ||
1512 | @end example | ||
1513 | |||
1514 | @node Debugging with gnunet-arm | ||
1515 | @section Debugging with gnunet-arm | ||
1516 | |||
1517 | Even if services are managed by @command{gnunet-arm}, you can | ||
1518 | start them with @command{gdb} or @command{valgrind}. For | ||
1519 | example, you could add the following lines to your | ||
1520 | configuration file to start the DHT service in a @command{gdb} | ||
1521 | session in a fresh @command{xterm}: | ||
1522 | |||
1523 | @example | ||
1524 | [dht] | ||
1525 | PREFIX=xterm -e gdb --args | ||
1526 | @end example | ||
1527 | |||
1528 | @noindent | ||
1529 | Alternatively, you can stop a service that was started via | ||
1530 | ARM and run it manually: | ||
1531 | |||
1532 | @example | ||
1533 | $ gnunet-arm -k dht | ||
1534 | $ gdb --args gnunet-service-dht -L DEBUG | ||
1535 | $ valgrind gnunet-service-dht -L DEBUG | ||
1536 | @end example | ||
1537 | |||
1538 | @noindent | ||
1539 | Assuming other services are well-written, they will automatically | ||
1540 | re-integrate the restarted service with the peer. | ||
1541 | |||
1542 | GNUnet provides a powerful logging mechanism providing log | ||
1543 | levels @code{ERROR}, @code{WARNING}, @code{INFO} and @code{DEBUG}. | ||
1544 | The current log level is configured using the @code{$GNUNET_FORCE_LOG} | ||
1545 | environmental variable. The @code{DEBUG} level is only available if | ||
1546 | @command{--enable-logging=verbose} was used when running | ||
1547 | @command{configure}. More details about logging can be found under | ||
1548 | @uref{https://docs.gnunet.org/#Logging}. | ||
1549 | |||
1550 | You should also probably enable the creation of core files, by setting | ||
1551 | @code{ulimit}, and echo'ing @code{1} into | ||
1552 | @file{/proc/sys/kernel/core\_uses\_pid}. Then you can investigate the | ||
1553 | core dumps with @command{gdb}, which is often the fastest method to | ||
1554 | find simple errors. | ||
1555 | |||
1556 | Exercise: Add a memory leak to your service and obtain a trace | ||
1557 | pointing to the leak using @command{valgrind} while running the service | ||
1558 | from @command{gnunet-service-arm}. | ||
1559 | |||
1560 | |||
1561 | @c ********************************************************************* | ||
1562 | @node GNU Free Documentation License | ||
1563 | @appendix GNU Free Documentation License | ||
1564 | @cindex license, GNU Free Documentation License | ||
1565 | @include fdl-1.3.texi | ||
1566 | |||
1567 | |||
1568 | @bye | ||