diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-05 16:31:38 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-05 17:15:50 -0400 |
commit | 63b4ea22af8e8314dd718f02046de5f4b91edf9d (patch) | |
tree | af52b6fba37f22c86447fd5267dd5eb557807c8b /src/or/hs_client.h | |
parent | ce84200542f48a92e8b56a8d032401ecd153e90c (diff) | |
download | tor-63b4ea22af8e8314dd718f02046de5f4b91edf9d.tar.gz tor-63b4ea22af8e8314dd718f02046de5f4b91edf9d.zip |
Move literally everything out of src/or
This commit won't build yet -- it just puts everything in a slightly
more logical place.
The reasoning here is that "src/core" will hold the stuff that every (or
nearly every) tor instance will need in order to do onion routing.
Other features (including some necessary ones) will live in
"src/feature". The "src/app" directory will hold the stuff needed
to have Tor be an application you can actually run.
This commit DOES NOT refactor the former contents of src/or into a
logical set of acyclic libraries, or change any code at all. That
will have to come in the future.
We will continue to move things around and split them in the future,
but I hope this lays a reasonable groundwork for doing so.
Diffstat (limited to 'src/or/hs_client.h')
-rw-r--r-- | src/or/hs_client.h | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/src/or/hs_client.h b/src/or/hs_client.h deleted file mode 100644 index 8083910747..0000000000 --- a/src/or/hs_client.h +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2017-2018, The Tor Project, Inc. */ -/* See LICENSE for licensing information */ - -/** - * \file hs_client.h - * \brief Header file containing client data for the HS subsytem. - **/ - -#ifndef TOR_HS_CLIENT_H -#define TOR_HS_CLIENT_H - -#include "lib/crypt_ops/crypto_ed25519.h" -#include "or/hs_descriptor.h" -#include "or/hs_ident.h" - -/* Status code of a descriptor fetch request. */ -typedef enum { - /* Something internally went wrong. */ - HS_CLIENT_FETCH_ERROR = -1, - /* The fetch request has been launched successfully. */ - HS_CLIENT_FETCH_LAUNCHED = 0, - /* We already have a usable descriptor. No fetch. */ - HS_CLIENT_FETCH_HAVE_DESC = 1, - /* No more HSDir available to query. */ - HS_CLIENT_FETCH_NO_HSDIRS = 2, - /* The fetch request is not allowed. */ - HS_CLIENT_FETCH_NOT_ALLOWED = 3, - /* We are missing information to be able to launch a request. */ - HS_CLIENT_FETCH_MISSING_INFO = 4, - /* There is a pending fetch for the requested service. */ - HS_CLIENT_FETCH_PENDING = 5, -} hs_client_fetch_status_t; - -void hs_client_note_connection_attempt_succeeded( - const edge_connection_t *conn); - -int hs_client_decode_descriptor( - const char *desc_str, - const ed25519_public_key_t *service_identity_pk, - hs_descriptor_t **desc); -int hs_client_any_intro_points_usable(const ed25519_public_key_t *service_pk, - const hs_descriptor_t *desc); -int hs_client_refetch_hsdesc(const ed25519_public_key_t *identity_pk); -void hs_client_dir_info_changed(void); - -int hs_client_send_introduce1(origin_circuit_t *intro_circ, - origin_circuit_t *rend_circ); - -void hs_client_circuit_has_opened(origin_circuit_t *circ); - -int hs_client_receive_rendezvous_acked(origin_circuit_t *circ, - const uint8_t *payload, - size_t payload_len); -int hs_client_receive_introduce_ack(origin_circuit_t *circ, - const uint8_t *payload, - size_t payload_len); -int hs_client_receive_rendezvous2(origin_circuit_t *circ, - const uint8_t *payload, - size_t payload_len); - -void hs_client_desc_has_arrived(const hs_ident_dir_conn_t *ident); - -extend_info_t *hs_client_get_random_intro_from_edge( - const edge_connection_t *edge_conn); - -int hs_client_reextend_intro_circuit(origin_circuit_t *circ); - -void hs_client_purge_state(void); - -void hs_client_free_all(void); - -#ifdef HS_CLIENT_PRIVATE - -STATIC routerstatus_t * -pick_hsdir_v3(const ed25519_public_key_t *onion_identity_pk); - -STATIC extend_info_t * -client_get_random_intro(const ed25519_public_key_t *service_pk); - -STATIC extend_info_t * -desc_intro_point_to_extend_info(const hs_desc_intro_point_t *ip); - -STATIC int handle_rendezvous2(origin_circuit_t *circ, const uint8_t *payload, - size_t payload_len); - -MOCK_DECL(STATIC hs_client_fetch_status_t, - fetch_v3_desc, (const ed25519_public_key_t *onion_identity_pk)); - -#endif /* defined(HS_CLIENT_PRIVATE) */ - -#endif /* !defined(TOR_HS_CLIENT_H) */ - |