crypt_path.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /**
  2. * \file crypt_path.h
  3. * \brief Header file for crypt_path.c.
  4. **/
  5. #ifndef CRYPT_PATH_H
  6. #define CRYPT_PATH_H
  7. void cpath_assert_layer_ok(const crypt_path_t *cp);
  8. void cpath_assert_ok(const crypt_path_t *cp);
  9. int cpath_append_hop(crypt_path_t **head_ptr, extend_info_t *choice);
  10. int cpath_init_circuit_crypto(crypt_path_t *cpath,
  11. const char *key_data, size_t key_data_len,
  12. int reverse, int is_hs_v3);
  13. void
  14. cpath_free(crypt_path_t *victim);
  15. void cpath_extend_linked_list(crypt_path_t **head_ptr, crypt_path_t *new_hop);
  16. void
  17. cpath_crypt_cell(const crypt_path_t *cpath, uint8_t *payload, bool is_decrypt);
  18. struct crypto_digest_t *
  19. cpath_get_incoming_digest(const crypt_path_t *cpath);
  20. void cpath_sendme_record_cell_digest(crypt_path_t *cpath,
  21. bool is_foward_digest);
  22. void
  23. cpath_set_cell_forward_digest(crypt_path_t *cpath, cell_t *cell);
  24. crypt_path_t *cpath_get_next_non_open_hop(crypt_path_t *cpath);
  25. void cpath_sendme_circuit_record_inbound_cell(crypt_path_t *cpath);
  26. uint8_t *cpath_get_sendme_digest(crypt_path_t *cpath);
  27. #if defined(TOR_UNIT_TESTS)
  28. unsigned int cpath_get_n_hops(crypt_path_t **head_ptr);
  29. #endif /* defined(TOR_UNIT_TESTS) */
  30. #endif /* !defined(CRYPT_PATH_H) */