 | RIP eventrace |
Client makes a whois query
Use Case:
-
Client connects to the server (sv) whois port.
-
Server starts a thread (th) to serve the client using a "whois protocol" (pw).
-
Thread waits for a whois query.
-
Client issues a whois query.
-
Thread sends a banner to the client.
-
Client receives the banner.
-
Thread converts the whois query into a "query command" (qc).
-
The qc is made up of a list of keytypes. These are obtained by performing
a series of tests on the keys received in the whois query, by "which_keytypes"
(wq).
-
A set of "query instructions" (qi) are created from the qc.
-
The set of instructions in qi are executed.
-
A connections is made to the database.
-
For instructions that require the "radix tree" (rx), a query is made directly
to that.
-
The other queries go to the database.
-
Results are returned one row at a time.
-
A string is extracted from the row, one column at a time.
-
The results are sent back to the client.
-
The client receives the results.
-
The results are freed from memory.
-
The connection to the database is closed.
-
The connection to the client is closed.
-
The client is disconnected.
Event Trace:
+--------+ +------+ +------+ +------+ +------+ +------+ +------+ +------+ +------+
| client | tcp | sk | | th | | pw | | qc | | wk | | qi | | sq | | rx |
+---+----+ : +---+--+ +---+--+ +---+--+ +---+--+ +---+--+ +---+--+ +---+--+ +---+--+
1. | connect : | | | | | | | |
2. $-------------------:-------}| | PW_interact() | | | | | |
$ : | $--------------}| | | | | |
$ : | | $ | | | | |
3. $ : | | SK_gets() $ | | | | |
$ : |{------------------------------$ | | | | |
$ : $ | | | | | | |
/ : / | | | | | | |
$ : $ | | | | | | |
4. $ whois query : $ | | | | | | |
$---------------------------}$ | | | | | | |
5. | : | | SK_puts() $ | | | | |
6. | whois banner : |{------------------------------$ | | | | |
|{---------------------------$ : | | | | | |
7. | : | | $ QC_new() | | | | |
8. | : | : $--------------}| WK_new() | | | |
| : | | | $--------------}| | | |
| : | | | | $ | | |
9. | : | | $ QI_new() | | | | |
| : | | $----------------------------------------------}| | |
| : | | | | | $ | |
10. | : | | $ QI_execute() | | | | |
| : | | $----------------------------------------------}| | |
11. | : | | | | | $ SQ_get_connection() |
| : | | | | | $--------------}| |
| : | | | | | | $ |
12. | : | | | | | $ RX_asc_search() |
| : | | | | | $------------------------------}|
| : | | | | | | | $
13. | : | | | | | $ SQ_execute_query() |
| : | | | | | $--------------}| |
| : | | | | | | $ |
14. | : | | | | | $ SQ_row_next() | |
| : | | | | | $--------------}| |
| : | | | | | | $ |
15. | : | | | | | $ SQ_get_column_string() |
| : | | | | | $--------------}| |
| : | | | | | | $ |
16. | : | | | | | SK_puts() $ | |
17. | whois objects : |{------------------------------------------------------------------------------$ | |
|{---------------------------$ | | | | | | |
18. | : | | | | | $ SQ_free_result() |
| : | | | | | $--------------}| |
| : | | | | | | $ |
19. | : | | | | | $ SQ_close_connection() |
| : | | | | | $--------------}| |
| : | | | | | | $ |
| : | | | | | $ | |
20. | : | | SK_close() $ | | | | |
21. | disconnect : |{------------------------------$ | | | | |
|{---------------------------$ | | | | | | |
| : | | | | | | | |