9027e19be040902d6085d975af6a91d2fba8cbdc
[radsecproxy.git] / lib / HACKING
1 HACKING file for libradsec (in Emacs -*- org -*- mode).
2
3 Status as of libradsec-0.0.2-dev (2011-03-24).
4
5 * Build instructions
6 cd libradsec/lib
7 sh autogen.sh
8 ./configure #--enable-tls
9 make
10
11 examples/client -r examples/client.conf blocking-tls; echo $?
12
13 * Design of the API
14 - There are three usage modes
15   - Application use the send and receive calls (blocking mode)
16   - Application registers callbacks and runs the libevent dispatch
17     loop (a.k.a. user dispatch mode)
18   - Application runs its own event loop, using fd's for select and
19     performs I/O using the libradsec send/receive calls
20     (a.k.a. on-your-own mode)
21 - Fully reentrant (FIXME: issues with libfreeradius-radius?)
22 - User chooses allocation regime
23
24 * Dependencies
25 Details apply to Ubuntu 10.10.
26
27 - libfreeradius-radius (2.1.9+dfsg-1ubuntu1)
28   sudo apt-get install libfreeradius-dev libfreeradius2
29 - libconfuse (2.7-1)
30   sudo apt-get install libconfuse-dev libconfuse0
31 - libevent from source (release-2.0.10-stable)
32   git clone --branch release-2.0.10-stable git://levent.git.sourceforge.net/gitroot/levent/levent
33   cd levent; sh autogen.sh && ./configure --enable-openssl
34   make && sudo make install
35 - OpenSSL (optional, for TLS and DTLS support)
36   sudo apt-get install libssl-dev
37   
38 * Functionality and quality
39 ** Not well tested
40 - reading config file
41 - [TCP] short read
42 - [TCP] short write
43 - [TLS] basic tls support
44 ** Known issues
45 - error stack is only one entry deep
46 - custom allocation scheme is not used in all places
47 ** Not implemented
48 - server failover
49 - [TLS] verification of CN
50 - [TLS] preshared key support
51 - [DTLS] support
52
53 * Found a bug?
54 Please report it.  This is how we improve the quality of the code.
55
56 If possible, please build the library with DEBUG defined (CFLAGS="-g
57 -DDEBUG") and reproduce the problem.  With DEBUG defined, lots of
58 asserts are enabled which might give a hint about what's gone wrong.
59
60 Running the library under gdb is another good idea.  If you experience
61 a crash, catching it in gdb and providing a backtrace is highly
62 valuable for debugging.
63
64 Contact: mailto:linus+libradsec@nordu.net