gnunet-handbook

The GNUnet Handbook
Log | Files | Refs

util.rst (1803B)


      1 .. _GNUnet-libgnunetutil:
      2 
      3 *************
      4 libgnunetutil
      5 *************
      6 
      7 .. This section of the docs is particularly amenable to
      8    integration with the doxygen output, as it is a library and not
      9    an individual program.
     10 
     11 libgnunetutil is the fundamental library that all GNUnet code builds upon.
     12 Ideally, this library should contain most of the platform dependent code
     13 (except for user interfaces and really special needs that only few
     14 applications have). It is also supposed to offer basic services that most
     15 if not all GNUnet binaries require. The code of libgnunetutil is in the
     16 ``src/util/`` directory. The public interface to the library is in the
     17 ``gnunet_util.h`` header. 
     18 
     19 The functions provided by libgnunetutil fall
     20 roughly into the following categories (in roughly the order of importance
     21 for new developers):
     22 
     23 
     24 * logging (common_logging.c)
     25 * memory allocation (common_allocation.c)
     26 * endianness conversion (common_endian.c)
     27 * internationalization (common_gettext.c)
     28 * String manipulation (string.c)
     29 * file access (disk.c)
     30 * buffered disk IO (bio.c)
     31 * time manipulation (time.c)
     32 * configuration parsing (configuration.c)
     33 * command-line handling (getopt*.c)
     34 * cryptography (crypto_*.c)
     35 * data structures (container_*.c)
     36 * CPS-style scheduling (scheduler.c)
     37 * Program initialization (program.c)
     38 * Networking (network.c, client.c, server*.c, service.c)
     39 * message queuing (mq.c)
     40 * bandwidth calculations (bandwidth.c)
     41 * Other OS-related (os*.c, plugin.c, signal.c)
     42 * Pseudonym management (pseudonym.c)
     43 
     44 It should be noted that only developers that fully understand this entire
     45 API will be able to write good GNUnet code.
     46 
     47 Ideally, porting GNUnet should only require porting the gnunetutil
     48 library. More testcases for the gnunetutil APIs are therefore a great
     49 way to make porting of GNUnet easier.