1 /* Copyright (c) 2023, The Tor Project, Inc. */
2 /* See LICENSE for licensing information */
6 * \brief Header file for conflux_pool.c.
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
,
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
);
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 */