Functions to queue create cells, and parse and create the CREATE cell and its allies.
More...
|
static int | check_create_cell (const create_cell_t *cell, int unknown_ok) |
|
void | create_cell_init (create_cell_t *cell_out, uint8_t cell_type, uint16_t handshake_type, uint16_t handshake_len, const uint8_t *onionskin) |
|
static int | parse_create2_payload (create_cell_t *cell_out, const uint8_t *p, size_t p_len) |
|
int | create_cell_parse (create_cell_t *cell_out, const cell_t *cell_in) |
|
static int | check_created_cell (const created_cell_t *cell) |
|
int | created_cell_parse (created_cell_t *cell_out, const cell_t *cell_in) |
|
static int | check_extend_cell (const extend_cell_t *cell) |
|
static int | extend_cell_from_extend1_cell_body (extend_cell_t *cell_out, const extend1_cell_body_t *cell) |
|
static int | create_cell_from_create2_cell_body (create_cell_t *cell_out, const create2_cell_body_t *cell) |
|
static int | extend_cell_from_extend2_cell_body (extend_cell_t *cell_out, const extend2_cell_body_t *cell) |
|
int | extend_cell_parse (extend_cell_t *cell_out, const uint8_t command, const uint8_t *payload, size_t payload_length) |
|
static int | check_extended_cell (const extended_cell_t *cell) |
|
int | extended_cell_parse (extended_cell_t *cell_out, const uint8_t command, const uint8_t *payload, size_t payload_len) |
|
static int | create_cell_format_impl (cell_t *cell_out, const create_cell_t *cell_in, int relayed) |
|
int | create_cell_format (cell_t *cell_out, const create_cell_t *cell_in) |
|
int | create_cell_format_relayed (cell_t *cell_out, const create_cell_t *cell_in) |
|
int | created_cell_format (cell_t *cell_out, const created_cell_t *cell_in) |
|
static int | should_include_ed25519_id_extend_cells (const networkstatus_t *ns, const or_options_t *options) |
|
int | extend_cell_format (uint8_t *command_out, uint16_t *len_out, uint8_t *payload_out, const extend_cell_t *cell_in) |
|
int | extended_cell_format (uint8_t *command_out, uint16_t *len_out, uint8_t *payload_out, const extended_cell_t *cell_in) |
|
Functions to queue create cells, and parse and create the CREATE cell and its allies.
This module has a few functions, all related to the CREATE/CREATED handshake that we use on links in order to create a circuit, and the related EXTEND/EXTENDED handshake that we use over circuits in order to extend them an additional hop.
Clients invoke these functions when creating or extending a circuit, from circuitbuild.c.
Relays invoke these functions when they receive a CREATE or EXTEND cell in command.c or relay.c, in order to queue the pending request. They also invoke them from cpuworker.c, which handles dispatching onionskin requests to different worker threads.
This module also handles:
-
Queueing incoming onionskins on the relay side before passing them to worker threads.
-
Expiring onionskins on the relay side if they have waited for too long.
-
Packaging private keys on the server side in order to pass them to worker threads.
-
Encoding and decoding CREATE, CREATED, CREATE2, and CREATED2 cells.
-
Encoding and decodign EXTEND, EXTENDED, EXTEND2, and EXTENDED2 relay cells.
Definition in file onion.c.