|
Tor 0.5.0.0-alpha-dev
|
Header file for crypt_path.c. More...
#include "core/crypto/relay_crypto.h"Go to the source code of this file.
Functions | |
| void | cpath_assert_layer_ok (const crypt_path_t *cp) |
| void | cpath_assert_ok (const crypt_path_t *cp) |
| int | cpath_append_hop (crypt_path_t **head_ptr, extend_info_t *choice) |
| int | cpath_init_circuit_crypto (relay_crypto_alg_t alg, crypt_path_t *cpath, const char *key_data, size_t key_data_len) |
| void | cpath_free (crypt_path_t *victim) |
| void | cpath_extend_linked_list (crypt_path_t **head_ptr, crypt_path_t *new_hop) |
| crypt_path_t * | cpath_get_next_non_open_hop (crypt_path_t *cpath) |
| void | cpath_sendme_circuit_record_inbound_cell (crypt_path_t *cpath) |
| const uint8_t * | cpath_get_sendme_tag (crypt_path_t *cpath, size_t *len_out) |
Header file for crypt_path.c.
Definition in file crypt_path.h.
| int cpath_append_hop | ( | crypt_path_t ** | head_ptr, |
| extend_info_t * | choice | ||
| ) |
Create a new hop, annotate it with information about its corresponding router choice, and append it to the end of the cpath head_ptr.
Definition at line 59 of file crypt_path.c.
Referenced by circuit_append_new_exit(), and onion_extend_cpath().
| void cpath_assert_layer_ok | ( | const crypt_path_t * | cp | ) |
Verify that cpath layer cp has all of its invariants correct. Trigger an assert if anything is invalid.
Definition at line 107 of file crypt_path.c.
Referenced by assert_connection_ok(), and cpath_assert_ok().
| void cpath_assert_ok | ( | const crypt_path_t * | cp | ) |
Verify that cpath cp has all of its invariants correct. Trigger an assert if anything is invalid.
Definition at line 84 of file crypt_path.c.
Referenced by assert_circuit_ok().
| void cpath_extend_linked_list | ( | crypt_path_t ** | head_ptr, |
| crypt_path_t * | new_hop | ||
| ) |
Add new_hop to the end of the doubly-linked-list head_ptr. This function is used to extend cpath by another hop.
Definition at line 42 of file crypt_path.c.
Referenced by cpath_append_hop(), and finalize_rend_circuit().
| void cpath_free | ( | crypt_path_t * | victim | ) |
Deallocate space associated with the cpath node victim.
Definition at line 159 of file crypt_path.c.
Referenced by circuit_clear_cpath(), and circuit_truncated().
| crypt_path_t * cpath_get_next_non_open_hop | ( | crypt_path_t * | cpath | ) |
Return the first non-open hop in cpath, or return NULL if all hops are open.
Definition at line 188 of file crypt_path.c.
Referenced by circuit_finish_handshake(), circuit_handle_first_hop(), and circuit_send_next_onion_skin().
| const uint8_t * cpath_get_sendme_tag | ( | crypt_path_t * | cpath, |
| size_t * | len_out | ||
| ) |
Return the sendme tag of this cpath, along with its length.
Definition at line 178 of file crypt_path.c.
Referenced by sendme_circuit_consider_sending().
| int cpath_init_circuit_crypto | ( | relay_crypto_alg_t | alg, |
| crypt_path_t * | cpath, | ||
| const char * | key_data, | ||
| size_t | key_data_len | ||
| ) |
Initialize cpath->{f|b}_{crypto|digest} from the key material in key_data.
If is_hs_v3 is set, this cpath will be used for next gen hidden service circuits and key_data must be at least HS_NTOR_KEY_EXPANSION_KDF_OUT_LEN bytes in length.
If is_hs_v3 is not set, key_data must contain CPATH_KEY_MATERIAL_LEN bytes, which are used as follows:
(If 'reverse' is true, then f_XX and b_XX are swapped.)
Return 0 if init was successful, else -1 if it failed.
Definition at line 148 of file crypt_path.c.
Referenced by circuit_finish_handshake(), and create_rend_cpath().