Tor 0.4.9.2-alpha-dev
|
Code that is related to SENDME cells both in terms of creating/parsing cells and handling the content. More...
#include "core/or/or.h"
#include "app/config/config.h"
#include "core/crypto/relay_crypto.h"
#include "core/mainloop/connection.h"
#include "core/or/cell_st.h"
#include "core/or/crypt_path.h"
#include "core/or/circuitlist.h"
#include "core/or/circuituse.h"
#include "core/or/or_circuit_st.h"
#include "core/or/relay.h"
#include "core/or/sendme.h"
#include "core/or/congestion_control_common.h"
#include "core/or/congestion_control_flow.h"
#include "feature/nodelist/networkstatus.h"
#include "lib/ctime/di_ops.h"
#include "trunnel/sendme_cell.h"
Go to the source code of this file.
Code that is related to SENDME cells both in terms of creating/parsing cells and handling the content.
Definition in file sendme.c.
STATIC ssize_t build_cell_payload_v1 | ( | const uint8_t * | cell_digest, |
uint8_t * | payload | ||
) |
|
static |
STATIC bool cell_version_can_be_handled | ( | uint8_t | cell_version | ) |
STATIC bool circuit_sendme_cell_is_next | ( | int | deliver_window, |
int | sendme_inc | ||
) |
Return true iff the next cell for the given cell window is expected to be a SENDME.
We are able to know that because the package or inflight window value minus one cell (the possible SENDME cell) should be a multiple of the cells-per-sendme increment value (set via consensus parameter, negotiated for the circuit, and passed in as sendme_inc).
This function is used when recording a cell digest and this is done quite low in the stack when decrypting or encrypting a cell. The window is only updated once the cell is actually put in the outbuf.
|
static |
|
static |
|
static |
void sendme_circuit_consider_sending | ( | circuit_t * | circ, |
crypt_path_t * | layer_hint | ||
) |
int sendme_circuit_data_received | ( | circuit_t * | circ, |
crypt_path_t * | layer_hint | ||
) |
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 373 of file sendme.c.
Referenced by connection_edge_finished_flushing().
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 | ||
) |
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 * | layer_hint, |
circuit_t * | circ | ||
) |
int sendme_process_stream_level | ( | edge_connection_t * | conn, |
circuit_t * | circ, | ||
uint16_t | cell_body_len | ||
) |
void sendme_record_cell_digest_on_circ | ( | circuit_t * | circ, |
crypt_path_t * | cpath | ||
) |
void sendme_record_received_cell_digest | ( | circuit_t * | circ, |
crypt_path_t * | cpath | ||
) |
void sendme_record_sending_cell_digest | ( | circuit_t * | circ, |
crypt_path_t * | cpath | ||
) |
int sendme_stream_data_received | ( | edge_connection_t * | conn | ) |