Tor
0.4.7.0-alpha-dev
|
Header file containing cell data for the whole HS subsystem. More...
Go to the source code of this file.
Data Structures | |
struct | hs_cell_introduce1_data_t |
struct | hs_cell_introduce2_data_t |
Macros | |
#define | HS_CELL_INTRODUCE1_MIN_SIZE 246 |
Functions | |
ssize_t | hs_cell_build_establish_intro (const char *circ_nonce, const hs_service_config_t *config, const hs_service_intro_point_t *ip, uint8_t *cell_out) |
ssize_t | hs_cell_build_rendezvous1 (const uint8_t *rendezvous_cookie, size_t rendezvous_cookie_len, const uint8_t *rendezvous_handshake_info, size_t rendezvous_handshake_info_len, uint8_t *cell_out) |
ssize_t | hs_cell_build_introduce1 (const hs_cell_introduce1_data_t *data, uint8_t *cell_out) |
ssize_t | hs_cell_build_establish_rendezvous (const uint8_t *rendezvous_cookie, uint8_t *cell_out) |
ssize_t | hs_cell_parse_intro_established (const uint8_t *payload, size_t payload_len) |
ssize_t | hs_cell_parse_introduce2 (hs_cell_introduce2_data_t *data, const origin_circuit_t *circ, const hs_service_t *service) |
int | hs_cell_parse_introduce_ack (const uint8_t *payload, size_t payload_len) |
int | hs_cell_parse_rendezvous2 (const uint8_t *payload, size_t payload_len, uint8_t *handshake_info, size_t handshake_info_len) |
void | hs_cell_introduce1_data_clear (hs_cell_introduce1_data_t *data) |
Header file containing cell data for the whole HS subsystem.
Definition in file hs_cell.h.
#define HS_CELL_INTRODUCE1_MIN_SIZE 246 |
ssize_t hs_cell_build_establish_intro | ( | const char * | circ_nonce, |
const hs_service_config_t * | service_config, | ||
const hs_service_intro_point_t * | ip, | ||
uint8_t * | cell_out | ||
) |
Build an ESTABLISH_INTRO cell with the given circuit nonce and intro point object. The encoded cell is put in cell_out that MUST at least be of the size of RELAY_PAYLOAD_SIZE. Return the encoded cell length on success else a negative value and cell_out is untouched.
Definition at line 563 of file hs_cell.c.
Referenced by send_establish_intro().
ssize_t hs_cell_build_establish_rendezvous | ( | const uint8_t * | rendezvous_cookie, |
uint8_t * | cell_out | ||
) |
Build an ESTABLISH_RENDEZVOUS cell from the given rendezvous_cookie. The encoded cell is put in cell_out which must be of at least RELAY_PAYLOAD_SIZE. On success, the encoded length is returned and the caller should clear up the content of the cell.
This function can't fail.
ssize_t hs_cell_build_introduce1 | ( | const hs_cell_introduce1_data_t * | data, |
uint8_t * | cell_out | ||
) |
ssize_t hs_cell_build_rendezvous1 | ( | const uint8_t * | rendezvous_cookie, |
size_t | rendezvous_cookie_len, | ||
const uint8_t * | rendezvous_handshake_info, | ||
size_t | rendezvous_handshake_info_len, | ||
uint8_t * | cell_out | ||
) |
void hs_cell_introduce1_data_clear | ( | hs_cell_introduce1_data_t * | data | ) |
ssize_t hs_cell_parse_intro_established | ( | const uint8_t * | payload, |
size_t | payload_len | ||
) |
ssize_t hs_cell_parse_introduce2 | ( | hs_cell_introduce2_data_t * | data, |
const origin_circuit_t * | circ, | ||
const hs_service_t * | service | ||
) |
Parse the INTRODUCE2 cell using data which contains everything we need to do so and contains the destination buffers of information we extract and compute from the cell. Return 0 on success else a negative value. The service and circ are only used for logging purposes.
Definition at line 768 of file hs_cell.c.
Referenced by hs_circ_handle_introduce2().
int hs_cell_parse_introduce_ack | ( | const uint8_t * | payload, |
size_t | payload_len | ||
) |
int hs_cell_parse_rendezvous2 | ( | const uint8_t * | payload, |
size_t | payload_len, | ||
uint8_t * | handshake_info, | ||
size_t | handshake_info_len | ||
) |
Handle a RENDEZVOUS2 cell encoded in payload of length payload_len. On success, handshake_info contains the data in the HANDSHAKE_INFO field, and 0 is returned. On error, a negative value is returned.
Definition at line 1022 of file hs_cell.c.
Referenced by handle_rendezvous2().