Tor 0.4.9.13
Loading...
Searching...
No Matches
sendme.h File Reference

Header file for sendme.c. More...

Go to the source code of this file.

Functions

void sendme_connection_edge_consider_sending (edge_connection_t *edge_conn)
 
void sendme_circuit_consider_sending (circuit_t *circ, crypt_path_t *layer_hint)
 
int sendme_process_circuit_level (crypt_path_t *layer_hint, circuit_t *circ, const uint8_t *cell_payload, uint16_t cell_payload_len)
 
int sendme_process_circuit_level_impl (crypt_path_t *, circuit_t *)
 
int sendme_process_stream_level (edge_connection_t *conn, circuit_t *circ, uint16_t cell_body_len)
 
int sendme_stream_data_received (edge_connection_t *conn)
 
int sendme_circuit_data_received (circuit_t *circ, crypt_path_t *layer_hint)
 
int sendme_note_circuit_data_packaged (circuit_t *circ, crypt_path_t *layer_hint)
 
int sendme_note_stream_data_packaged (edge_connection_t *conn, size_t len)
 
void sendme_record_cell_digest_on_circ (circuit_t *circ, crypt_path_t *cpath)
 

Detailed Description

Header file for sendme.c.

Definition in file sendme.h.

Function Documentation

◆ sendme_circuit_consider_sending()

void sendme_circuit_consider_sending ( circuit_t * circ,
crypt_path_t * layer_hint )

Check if the deliver_window for circuit circ (at hop layer_hint if it's defined) is low enough that we should send a circuit-level sendme back down the circuit. If so, send enough sendmes that the window would be overfull if we sent any more.

Definition at line 464 of file sendme.c.

Referenced by connection_edge_process_relay_cell().

◆ sendme_circuit_data_received()

int sendme_circuit_data_received ( circuit_t * circ,
crypt_path_t * layer_hint )

Definition at line 644 of file sendme.c.

◆ sendme_connection_edge_consider_sending()

void sendme_connection_edge_consider_sending ( edge_connection_t * conn)

Called when we've just received a relay data cell, when we've just finished flushing all bytes to stream conn, or when we've flushed some bytes to the stream conn.

If conn->outbuf is not too full, and our deliver window is low, send back a suitable number of stream-level sendme cells.

Definition at line 417 of file sendme.c.

Referenced by connection_edge_finished_flushing(), connection_edge_flushed_some(), and handle_relay_msg().

◆ sendme_note_circuit_data_packaged()

int sendme_note_circuit_data_packaged ( circuit_t * circ,
crypt_path_t * layer_hint )

Definition at line 682 of file sendme.c.

◆ sendme_note_stream_data_packaged()

int sendme_note_stream_data_packaged ( edge_connection_t * conn,
size_t len )

Definition at line 723 of file sendme.c.

◆ sendme_process_circuit_level()

int sendme_process_circuit_level ( crypt_path_t * layer_hint,
circuit_t * circ,
const uint8_t * cell_payload,
uint16_t cell_payload_len )

Definition at line 509 of file sendme.c.

◆ sendme_process_circuit_level_impl()

int sendme_process_circuit_level_impl ( crypt_path_t * layer_hint,
circuit_t * circ )

Process a SENDME for Tor's original fixed window circuit-level flow control. Updates the package_window and ensures that it does not exceed the max.

Returns -END_CIRC_REASON_TORPROTOCOL if the max is exceeded, otherwise returns 0.

Definition at line 551 of file sendme.c.

◆ sendme_process_stream_level()

int sendme_process_stream_level ( edge_connection_t * conn,
circuit_t * circ,
uint16_t cell_body_len )

Definition at line 601 of file sendme.c.

◆ sendme_record_cell_digest_on_circ()

void sendme_record_cell_digest_on_circ ( circuit_t * circ,
crypt_path_t * cpath )

Definition at line 744 of file sendme.c.

◆ sendme_stream_data_received()

int sendme_stream_data_received ( edge_connection_t * conn)

Definition at line 667 of file sendme.c.