Tor 0.4.9.2-alpha-dev
|
Public APIs for conflux multipath support. More...
Go to the source code of this file.
Data Structures | |
struct | conflux_msg_t |
Macros | |
#define | CONFLUX_FOR_EACH_LEG_BEGIN(cfx, var) SMARTLIST_FOREACH_BEGIN(cfx->legs, conflux_leg_t *, var) |
#define | CONFLUX_FOR_EACH_LEG_END(var) SMARTLIST_FOREACH_END(var) |
#define | CONFLUX_NUM_LEGS(cfx) (smartlist_len(cfx->legs)) |
#define | conflux_relay_msg_free(msg) FREE_AND_NULL(conflux_msg_t, conflux_relay_msg_free_, (msg)) |
Functions | |
size_t | conflux_handle_oom (size_t bytes_to_remove) |
uint64_t | conflux_get_total_bytes_allocation (void) |
uint64_t | conflux_get_circ_bytes_allocation (const circuit_t *circ) |
void | conflux_update_rtt (conflux_t *cfx, circuit_t *circ, uint64_t rtt_usec) |
circuit_t * | conflux_decide_circ_for_send (conflux_t *cfx, circuit_t *orig_circ, uint8_t relay_command) |
circuit_t * | conflux_decide_next_circ (conflux_t *cfx) |
int | conflux_process_switch_command (circuit_t *in_circ, crypt_path_t *layer_hint, const relay_msg_t *msg) |
bool | conflux_should_multiplex (int relay_command) |
bool | conflux_process_relay_msg (conflux_t *cfx, circuit_t *in_circ, crypt_path_t *layer_hint, const relay_msg_t *msg) |
conflux_msg_t * | conflux_dequeue_relay_msg (conflux_t *cfx) |
void | conflux_note_cell_sent (conflux_t *cfx, circuit_t *circ, uint8_t relay_command) |
void | conflux_relay_msg_free_ (conflux_msg_t *msg) |
Public APIs for conflux multipath support.
Definition in file conflux.h.
#define CONFLUX_FOR_EACH_LEG_BEGIN | ( | cfx, | |
var | |||
) | SMARTLIST_FOREACH_BEGIN(cfx->legs, conflux_leg_t *, var) |
#define CONFLUX_FOR_EACH_LEG_END | ( | var | ) | SMARTLIST_FOREACH_END(var) |
#define CONFLUX_NUM_LEGS | ( | cfx | ) | (smartlist_len(cfx->legs)) |
#define conflux_relay_msg_free | ( | msg | ) | FREE_AND_NULL(conflux_msg_t, conflux_relay_msg_free_, (msg)) |
circuit_t * conflux_decide_circ_for_send | ( | conflux_t * | cfx, |
circuit_t * | orig_circ, | ||
uint8_t | relay_command | ||
) |
This function is called when we want to send a relay cell on a conflux, as well as when we want to compute available space in to package from streams.
It determines the circuit that relay command should be sent on, and sends a SWITCH cell if necessary.
It returns the circuit we should send on. If no circuits are ready to send, it returns NULL.
Definition at line 458 of file conflux.c.
Referenced by relay_send_command_from_edge_().
Returns the circuit that conflux would send on next, if conflux_decide_circ_for_send were called. This is used to compute available space in the package window.
Definition at line 610 of file conflux.c.
Referenced by conflux_can_send(), and conflux_decide_circ_for_send().
conflux_msg_t * conflux_dequeue_relay_msg | ( | conflux_t * | cfx | ) |
uint64_t conflux_get_circ_bytes_allocation | ( | const circuit_t * | circ | ) |
uint64_t conflux_get_total_bytes_allocation | ( | void | ) |
size_t conflux_handle_oom | ( | size_t | bytes_to_remove | ) |
bool conflux_process_relay_msg | ( | conflux_t * | cfx, |
circuit_t * | in_circ, | ||
crypt_path_t * | layer_hint, | ||
const relay_msg_t * | msg | ||
) |
Process an incoming relay cell for conflux. Called from connection_edge_process_relay_cell().
Returns true if the conflux system now has well-ordered cells to deliver to streams, false otherwise.
int conflux_process_switch_command | ( | circuit_t * | in_circ, |
crypt_path_t * | layer_hint, | ||
const relay_msg_t * | msg | ||
) |
void conflux_relay_msg_free_ | ( | conflux_msg_t * | msg | ) |
bool conflux_should_multiplex | ( | int | relay_command | ) |
Determine if we should multiplex a specific relay command or not.
TODO: Version of this that is the set of forbidden commands on linked circuits
Definition at line 50 of file conflux.c.
Referenced by conflux_decide_circ_for_send(), conflux_note_cell_sent(), and relay_send_command_from_edge_().