Adding "Monkey", GNUnet module for automatic debugging. Experimental code so far.
[oweals/gnunet.git] / HACKING
1 Naming conventions:
2
3 include files:
4 - _lib: library without need for a process
5 - _service: library that needs a service process
6 - _plugin: plugin definition
7 - _protocol: structs used in network protocol
8 - exceptions:
9   * gnunet_config.h      --- generated
10   * platform.h           --- first included
11   * plibc.h              --- external library
12   * gnunet_common.h      --- fundamental routines
13   * gnunet_directories.h --- generated
14   * gettext.h            --- external library
15
16 configuration:
17 - paths (that are substituted in all filenames) are in PATHS (have as few as possible)
18 - globals for the daemon are in [gnunetd] (for now, have as few as possible!)
19 - all options for a particular module (src/MODULE) are under [MODULE]
20 - options for a plugin of a module are under [MODULE-PLUGINNAME]
21 - options only for debugging / testing / profiling are under [TESTING],
22   together with the options for the testing module itself
23
24
25
26 exported symbols:
27 - must start with "GNUNET_modulename_" and be defined in "modulename.c"
28 - exceptions: those defined in gnunet_common.h
29
30 private (library-internal) symbols (including structs & macros):
31 - must NOT start with any prefix
32 - must not be exported in a way that linkers could use them or
33   other libraries might see them via headers; they must be either
34   declared/defined in C source files or in headers that are in 
35   the respective directory under src/modulename/ and NEVER be
36   declared in src/include/.
37
38 testcases:
39 - must be called "test_module-under-test_case-description.c"
40 - "case-description" maybe omitted if there is only one test
41
42
43 performance tests:
44 - must be called "perf_module-under-test_case-description.c"
45 - "case-description" maybe omitted if there is only one performance test
46
47
48
49 src/ directories:
50 - gnunet-NAME: end-user applications (i.e., gnunet-search, gnunet-arm)
51 - gnunet-service-NAME: service processes with accessor library (i.e., gnunet-service-arm)
52 - libgnunetNAME: accessor library (_service.h-header) or standalone library (_lib.h-header)
53 - gnunet-daemon-NAME: daemon process without accessor library (i.e., gnunet-daemon-hostlist) and no GNUnet management port
54 - libgnunet_plugin_DIR_NAME: loadable plugins (i.e., libgnunet_plugin_transport_tcp)
55
56
57
58 Minimum file-sharing system (in order of dependency):
59 gnunet-service-arm
60 gnunet-service-transport
61 gnunet-service-core
62 gnunet-daemon-hostlist
63 gnunet-daemon-topology
64 gnunet-service-statistics
65 gnunet-service-datastore
66 gnunet-service-datacache
67 gnunet-service-dht
68 gnunet-service-fs (or just lib?)
69
70
71
72
73 Coding style:
74 - GNU guidelines apply
75 - declare only one variable per line, so 
76
77   int i;
78   int j;
79
80   instead of
81
82   int i,j;