Bug 29085: Refactor non-padding accounting out of token removal.
[tor.git] / src / core / or / crypt_path.h
blob30c14b3dce4a12f331e538edf8d0f39014899509
1 /**
2 * \file crypt_path.h
3 * \brief Header file for crypt_path.c.
4 **/
6 #ifndef CRYPT_PATH_H
7 #define CRYPT_PATH_H
9 void cpath_assert_layer_ok(const crypt_path_t *cp);
11 void cpath_assert_ok(const crypt_path_t *cp);
13 int cpath_append_hop(crypt_path_t **head_ptr, extend_info_t *choice);
15 int cpath_init_circuit_crypto(crypt_path_t *cpath,
16 const char *key_data, size_t key_data_len,
17 int reverse, int is_hs_v3);
19 void
20 cpath_free(crypt_path_t *victim);
22 void cpath_extend_linked_list(crypt_path_t **head_ptr, crypt_path_t *new_hop);
24 void
25 cpath_crypt_cell(const crypt_path_t *cpath, uint8_t *payload, bool is_decrypt);
27 struct crypto_digest_t *
28 cpath_get_incoming_digest(const crypt_path_t *cpath);
30 void
31 cpath_set_cell_forward_digest(crypt_path_t *cpath, cell_t *cell);
33 crypt_path_t *cpath_get_next_non_open_hop(crypt_path_t *cpath);
35 void cpath_sendme_circuit_record_inbound_cell(crypt_path_t *cpath);
37 uint8_t *cpath_get_sendme_digest(crypt_path_t *cpath);
39 #if defined(TOR_UNIT_TESTS)
40 unsigned int cpath_get_n_hops(crypt_path_t **head_ptr);
41 #endif /* defined(TOR_UNIT_TESTS) */
43 #endif