e4d8d9fd1d9dd05bf2c4338370d334a3363a80e0
[radsecproxy.git] / lib / HACKING
1 HACKING file for libradsec (in Emacs -*- org -*- mode).
2
3 Status as of libradsec-0.0.1-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   - You use the send and receive calls (blocking mode)
16   - You register callbacks and run the libevent dispatch loop (user
17     dispatch mode)
18   - You run your own event loop, using fd's for select and do the I/O
19     using the libradsec send/receive calls (on-your-own mode)
20 - Fully reentrant (FIXME: any issues with libfreeradius-radius?)
21
22 * Dependencies
23 The details below apply to Ubuntu 10.10.
24
25 - libfreeradius-radius (2.1.9+dfsg-1ubuntu1)
26   sudo apt-get install libfreeradius-dev libfreeradius2
27 - libconfuse (2.7-1)
28   sudo apt-get install libconfuse-dev libconfuse0
29 - libevent from source (release-2.0.10-stable)
30   git clone --branch release-2.0.10-stable git://levent.git.sourceforge.net/gitroot/levent/levent
31   cd levent; sh autogen.sh && ./configure --enable-openssl
32   make && sudo make install
33 - OpenSSL (optional, for TLS and DTLS support)
34   sudo apt-get install libssl-dev
35   
36 * Functionality and quality
37 ** Not well tested
38 - reading config file
39 - [TCP] short read
40 - [TCP] short write
41 - [TLS] basic tls support
42 ** Known issues
43 - error stack is only one entry deep
44 ** Not implemented
45 - custom allocation scheme used in all places
46   issue: libfreeradius-radius
47 - server failover
48 - [TLS] verification of CN
49 - [TLS] preshared key support
50 - [DTLS] support
51
52 * Found a bug?
53 If possible, please build the library with DEBUG defined
54 (CFLAGS=-DDEBUG) and reproduce the problem.  With DEBUG defined, lots
55 of asserts are enabled which might give a hint about what's gone
56 wrong.
57
58 Running the library under gdb is another good idea.  If you experience
59 a crash, catching that in gdb and providing a backtrace is highly
60 valuable for debugging.
61
62 Contact: mailto:linus+libradsec@nordu.net