X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=HACKING;h=ecd9e6adb1b8769c3eea63d570173eb234dd7edb;hb=0ea2ffb99da4645d3984fd0b207bd78d261e8356;hp=3c50af952cbf58312705520b814f0abdfe99dfa5;hpb=0a217a8df1657b4334b55b0e4a6c7837a8dbcfd9;p=oweals%2Fgnunet.git diff --git a/HACKING b/HACKING index 3c50af952..ecd9e6adb 100644 --- a/HACKING +++ b/HACKING @@ -6,7 +6,7 @@ include files: - _plugin: plugin definition - _protocol: structs used in network protocol - exceptions: - * GNUNET_config.h --- generated // FIXME: decapitalize + * gnunet_config.h --- generated * platform.h --- first included * plibc.h --- external library * gnunet_common.h --- fundamental routines @@ -14,11 +14,37 @@ include files: * gettext.h --- external library +binaries: +- gnunet-service-xxx: service process (has listen socket) +- gnunet-daemon-xxx: daemon process (no listen socket) +- gnunet-helper-xxx[-yyy]: SUID helper for module xxx +- gnunet-yyy: command-line tool for end-users +- libgnunet_plugin_xxx_yyy.so: plugin for API xxx +- libgnunetxxx.so: library for API xxx + + +configuration: +- paths (that are substituted in all filenames) are in PATHS (have as few as possible) +- globals for the daemon are in [gnunetd] (for now, have as few as possible!) +- all options for a particular module (src/MODULE) are under [MODULE] +- options for a plugin of a module are under [MODULE-PLUGINNAME] +- options only for debugging / testing / profiling are under [TESTING], + together with the options for the testing module itself + + exported symbols: - must start with "GNUNET_modulename_" and be defined in "modulename.c" - exceptions: those defined in gnunet_common.h +private (library-internal) symbols (including structs & macros): +- must NOT start with any prefix +- must not be exported in a way that linkers could use them or + other libraries might see them via headers; they must be either + declared/defined in C source files or in headers that are in + the respective directory under src/modulename/ and NEVER be + declared in src/include/. + testcases: - must be called "test_module-under-test_case-description.c" - "case-description" maybe omitted if there is only one test @@ -26,32 +52,57 @@ testcases: performance tests: - must be called "perf_module-under-test_case-description.c" -- "case-description" maybe omitted if there is only one test - +- "case-description" maybe omitted if there is only one performance test +- Must only be run if HAVE_BENCHMARKS is satisfied src/ directories: -- apps: end-user applications (i.e., gnunet-search) -- connectors: libraries requiring services (i.e., libgnunetstatistics) -- libs: standalone libraries (i.e., libgnunetecrs, etc.) -- plugins: loadable plugins (i.e., TCP transport, MySQL backend) - * transports: udp/tcp/http/dv??? -- services: arm-controlled applications (i.e., gnunet-service-statistics) -- util: library for everyone +- gnunet-NAME: end-user applications (i.e., gnunet-search, gnunet-arm) +- gnunet-service-NAME: service processes with accessor library (i.e., gnunet-service-arm) +- libgnunetNAME: accessor library (_service.h-header) or standalone library (_lib.h-header) +- gnunet-daemon-NAME: daemon process without accessor library (i.e., gnunet-daemon-hostlist) and no GNUnet management port +- libgnunet_plugin_DIR_NAME: loadable plugins (i.e., libgnunet_plugin_transport_tcp) + + +Coding style: +- GNU guidelines apply +- declare only one variable per line, so + + int i; + int j; + + instead of + + int i,j; + + +Build-system: + +If you have code that is likely not to compile or build rules you might want to not +trigger for most developers, use "if HAVE_EXPERIMENTAL" in your Makefile.am. Then +it is OK to (temporarily) add non-compiling (or known-to-not-port) code. + +If you want to compile all testcases but NOT run them, run configure with the +--enable-test-suppression option. -For each directory in services, there should be one -in connectors and vice-versa. +If you want to run all testcases, including those that take a while, run configure with the +--enable-expensive-testcases option. -For each entry in apps, there should be one in libs. +If you want to compile and run benchmarks, run configure with the +--enable-benchmarks option. +If you want to obtain code coverage results, run configure with the +--enable-coverage option and run the coverage.sh script in contrib/. Minimum file-sharing system (in order of dependency): -gnunet-arm -gnunet-transport (name?) -gnunet-core (name?) -gnunet-datastore -gnunet-statistics (integrate traffic?) -gnunet-dv -gnunet-dht -gnunet-fs +gnunet-service-arm +gnunet-service-transport +gnunet-service-core +gnunet-daemon-hostlist +gnunet-daemon-topology +gnunet-service-statistics +gnunet-service-datastore +gnunet-service-datacache +gnunet-service-dht +gnunet-service-fs