tor  0.4.1.0-alpha-dev
Functions
onion_queue.h File Reference

Go to the source code of this file.

Functions

int onion_pending_add (or_circuit_t *circ, struct create_cell_t *onionskin)
 
or_circuit_tonion_next_task (struct create_cell_t **onionskin_out)
 
int onion_num_pending (uint16_t handshake_type)
 
void onion_pending_remove (or_circuit_t *circ)
 
void clear_pending_onions (void)
 

Detailed Description

Header file for onion_queue.c.

Definition in file onion_queue.h.

Function Documentation

◆ clear_pending_onions()

void clear_pending_onions ( void  )

Remove all circuits from the pending list. Called from tor_free_all.

Definition at line 351 of file onion_queue.c.

◆ onion_next_task()

or_circuit_t* onion_next_task ( create_cell_t **  onionskin_out)

Remove the highest priority item from ol_list[] and return it, or return NULL if the lists are empty.

Definition at line 267 of file onion_queue.c.

References decide_next_handshake_type(), and tor_assert().

◆ onion_num_pending()

int onion_num_pending ( uint16_t  handshake_type)

Return the number of handshake_type-style create requests pending.

Definition at line 299 of file onion_queue.c.

References ol_entries.

◆ onion_pending_add()

int onion_pending_add ( or_circuit_t circ,
create_cell_t onionskin 
)

Add circ to the end of ol_list and return 0, except if ol_list is too long, in which case do nothing and return -1.

Definition at line 140 of file onion_queue.c.

References create_cell_t::handshake_type.

◆ onion_pending_remove()

void onion_pending_remove ( or_circuit_t circ)

Go through ol_list, find the onion_queue_t element which points to circ, remove and free that element. Leave circ itself alone.

Definition at line 308 of file onion_queue.c.

References cpuworker_cancel_circ_handshake(), onion_queue_entry_remove(), and or_circuit_t::onionqueue_entry.

Referenced by circuit_about_to_free().