Merge branch 'maint-0.4.8'
[tor.git] / src / core / or / conflux_pool.h
blobeba726b03a1c14a818eb9f020813c2d4aea5bae5
1 /* Copyright (c) 2023, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
4 /**
5 * \file conflux_pool.h
6 * \brief Header file for conflux_pool.c.
7 **/
9 #ifndef TOR_CONFLUX_POOL_H
10 #define TOR_CONFLUX_POOL_H
12 #include "core/or/or.h"
14 void conflux_pool_init(void);
15 void conflux_notify_shutdown(void);
16 void conflux_pool_free_all(void);
18 origin_circuit_t *conflux_get_circ_for_conn(const entry_connection_t *conn,
19 time_t now);
21 void conflux_predict_new(time_t now);
23 bool conflux_launch_leg(const uint8_t *nonce);
25 void conflux_add_guards_to_exclude_list(const origin_circuit_t *circ,
26 smartlist_t *excluded);
27 void conflux_add_middles_to_exclude_list(const origin_circuit_t *circ,
28 smartlist_t *excluded);
30 void conflux_circuit_has_closed(circuit_t *circ);
31 void conflux_circuit_has_opened(origin_circuit_t *orig_circ);
32 void conflux_circuit_about_to_free(circuit_t *circ);
34 void conflux_process_link(circuit_t *circ, const cell_t *cell,
35 const uint16_t cell_len);
36 void conflux_process_linked(circuit_t *circ, crypt_path_t *layer_hint,
37 const cell_t *cell, const uint16_t cell_len);
38 void conflux_process_linked_ack(circuit_t *circ);
40 typedef struct conflux_t conflux_t;
41 void conflux_log_set(int loglevel, const conflux_t *cfx, bool is_client);
43 #ifdef TOR_UNIT_TESTS
44 bool launch_new_set(int num_legs);
45 void conflux_clear_shutdown(void);
46 digest256map_t *get_linked_pool(bool is_client);
47 digest256map_t *get_unlinked_pool(bool is_client);
48 extern uint8_t DEFAULT_CLIENT_UX;
49 extern uint8_t DEFAULT_EXIT_UX;
50 #endif /* defined(UNIT_TESTS) */
52 #endif /* TOR_CONFLUX_POOL_H */