2 Yes, we are looking for developers. If you have some programming skills,
3 you are welcome to help the development of mldonkey. There are different ways
4 to help us. You can see a bug, or a missing feature, and fix it, and then
5 send us a patch. If you want to spend more time, you can fix a lot of bugs, or
6 add more features, and we will grant you access to the CVS in the future.
7 You can also provide mldonkey with support for another p2p network.
9 If you don't want how to start, you must first understand the code (see the
10 information below), and then, you can call "mldonkey -check_impl" to
11 see which methods have not been implemented yet. You can also test different
12 operations and see what is not working good. Another option is to test
13 other p2p applications and try to import some interesting features in
16 Peer-to-peer systems that could be interested to implement:
18 SoulSeek (see pyslsk, a python clone)
19 Hotline (see fidelio, an open-source clone)
20 Mediaseek (audio galaxy clone)
25 The last ones use cryptography to protect the protocol. Maybe some of them
26 use the SSL library, and could be cracked this way ?
28 Maybe you need now some help to understand the code ?
30 1) Learn Objective-Caml (you won't be disappointed):
31 --------------------------------------------------
33 http://ocaml.inria.fr/
35 2) mldonkey directory tree:
36 --------------------------
40 config/ contains the autoconf configure.in script and other files
41 distrib/ files distributed with binaries in a release
42 patches/ patches to external programs (e.g. ocaml)
43 scripts/ nothing interesting here ...
44 tools/ useful tools to compile mldonkey (e.g. pa_zog.cma)
46 Useful general libraries:
48 cdk/ these two directories contain general modules and
49 lib/ data structures. diff is from history
51 net/ socket manipulation library around a select call (mldonkey
52 is fortunately not multi-threaded, that's why it works)
54 chat/ part of the mlchat program inside mldonkey:
56 mp3tagui/ mp3 manipulation library
60 common/ basic types and data structures common to all
63 Peer-to-peer modules (not necessary):
65 direct_connect/ Direct-Connect (must work on that)
66 limewire/ LimeWire (Gnutella client)
69 donkey/ the client part of donkey
70 server/ the server part of donkey
74 driver/ communication with interfaces and main loop
78 configwin/ configuration windows for lablgtk
79 gpattern/ tables and columns manipulation in lablgtk
80 okey/ key manipulation in lablgtk
81 gui/ the GTK interface
85 3) General architecture:
86 -----------------------
88 The main loop of mldonkey is located in the net/ library, which is responsible
89 for managing the connections and the timers around a select system call (there
90 are no threads in mldonkey).
92 mldonkey executes its modules in the following way:
94 1) The common/ part is executed: data structures are defined for all the
95 types that are common to all networks. For each type, an _ops type
96 defines operations that can be executed on this type. Each network
97 will have to fill such a structure to define its specific behaviors for
98 these types (well, it looks like object-oriented programming, but we don't
101 commonTypes.ml: basic simple types (it also contains the network type def)
102 gui_proto.ml: the protocol used to communicate with the GUI
104 Types and operations on these types that have to be defined by each network.
106 commonChatRoom.ml: chat rooms
107 commonClient.ml : client (either friend or source for a downloaded file)
108 commonFile.ml : downloaded file
109 commonNetwork.ml : network
110 commonResult.ml : result of a search
111 commonServer.ml : server
112 commonShared.ml : shared file
113 commonUser.ml : user (either server user or source for a result)
117 commonOptions.ml : basic options
118 commonComplexOptions.ml: complex options (downloaded files, servers, friends, etc)
120 Different useful functions:
128 2) All network modules are executed. The network modules have to register a
129 network structure (it is often done in the ...Types module). All modules
130 often use the same naming scheme:
132 ...Types.ml : types specific to a network. operations structures are
133 also often defined there.
134 ...Globals.ml : basic values (hash tables) and functions to store and
135 manipulate these types.
136 ...Options.ml : basic options for this network
137 ...ComplexOptions.ml : complex options for this network. often defines how
138 files, servers, etc should be stored in the common
140 ...Protocol.ml : encoding and decoding of messages for that network.
141 ...Clients.ml : communication between mldonkey and another client.
142 ...Servers.ml : communication between mldonkey and a server.
143 ...Interactive.ml : most functions that are called from the interfaces on
145 ...Main.ml : the functions to start and stop a network. the start function
146 creates sockets to connect to mldonkey, and timers
147 that are executed from time to time.
149 3) The final driver/ modules are executed. The last one (...Main.ml) call