Update README and HACKING.
[libradsec.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
22 - User chooses allocation regime
23
24 Note that as of 0.0.2.dev libradsec suffers from way too much focus on
25 the behaviour of a blocking client and is totally useless as a server.
26 Not only does it lack most of the functions needed for writing a
27 server but it also contains at least one architectural mishap which
28 kills the server idea -- a connection timeout (TCP) or a retransmit
29 timeout (UDP) will result in the event loop being broken. The same
30 thing will happen if there's an error on a TCP connection, f.ex. a
31 failing certificate validation (TLS).
32
33 * Dependencies
34 Details (within parentheses) apply to Debian Wheezy.
35
36 - libconfuse (2.7-4)
37   sudo apt-get install libconfuse-dev libconfuse0
38 - libevent2 (2.0.19-stable-3)
39   sudo apt-get install libevent-dev libevent-2.0-5
40 - OpenSSL (1.0.1c-4) -- optional, for TLS and DTLS support
41   sudo apt-get install libssl-dev libssl1.0.0
42   
43 * Functionality and quality
44 ** Not well tested
45 - reading config file
46 - [TCP] short read
47 - [TCP] short write
48 - [TLS] basic tls support
49 - [TLS] preshared key support
50 - [TLS] verification of CN
51
52 ** Known issues
53 - error stack is only one entry deep
54 - custom allocation scheme is not used in all places
55
56 ** Not implemented
57 - [client] server failover
58 - [DTLS] support
59 - [server] support
60
61 * Found a bug?
62 Please report it. That is how we improve the quality of the code.
63
64 If possible, please build the library with DEBUG defined (CFLAGS="-g
65 -DDEBUG") and reproduce the problem. With DEBUG defined, lots of
66 asserts are enabled which might give a hint about what's gone wrong.
67
68 Running the library under gdb is another good idea. If you experience
69 a crash, catching the crash in gdb and providing a backtrace is highly
70 valuable for debugging.
71
72 Contact: mailto:linus+libradsec@nordu.net