1 HOWITWORKS - Monkey >= 0.5.x
2 ============================
4 Last Update : Initial version
6 Note: I don't write or speak english very well :P .
8 Here I hope to explain how monkey works. This isn't a set design, this
9 design has been changing with time and will continue to change :) .
13 1) Starting and setting
14 2) Accepting and processing new connections
18 1) Starting and setting
19 -----------------------
20 In this section i will explain what monkey does at the beginning.
24 +----------------------+ <- file: monkey.c
25 + Reading options + func: main();
27 +----------------------+
29 +----------------------+ <- file: monkey.c, config.c
30 + Reading config files + func: main();
31 +----------------------+ |->Monkey_Read_Config();
34 +----------------------+ <- file: monkey.c, signals.c
35 + Starting signals + func: main();
36 +----------------------+ |->Init_Signals();
39 +----------------------+ <- file: monkey.c
40 + Setting socket + func: main();
41 +----------------------+
43 +----------------------+ <- file: monkey.c
44 + Setting threads + func: main();
46 +----------------------+
48 +----------------------+ <- file: monkey.c, utils.c
49 + Changing mode to + func: main();
50 + daemon if it was + |->set_daemon();
52 +----------------------+
54 +----------------------+ <- file: monkey.c, logfile.c
55 + Register PID + func: main();
56 + of process + |->add_log_pid();
57 +----------------------+
59 +----------------------+ <- file: monkey.c
60 + Starting main loop + func: main();
63 +----------------------+
65 2) Accepting and processing new connections
66 ------------------------------------------
67 When a new connection comes, monkey follows the next steps.
70 +----------------------+ <- file: monkey.c, deny.c
71 + Checking IP from + func: main();
72 + remote machine to + |->Deny_Check();
74 + not blocked in our +
76 +----------------------+
78 +----------------------+ <- file: monkeu.c
79 + Checking how many + func: main();
81 + processed by monkey +
82 +----------------------+
84 +----------------------+ <- file: monkey.c
85 + Passing connection + func: main();
86 + to a new thread + |->thread_init();
87 +----------------------+
89 +----------------------+ <- file: monkey.c, request.c
90 + Reciving request + func: thread_init();
91 + and processing + |->Request_Main();
92 +----------------------+