Back to index

tor  0.2.3.19-rc
rendclient.h
Go to the documentation of this file.
00001 /* Copyright (c) 2001 Matej Pfajfar.
00002  * Copyright (c) 2001-2004, Roger Dingledine.
00003  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
00004  * Copyright (c) 2007-2012, The Tor Project, Inc. */
00005 /* See LICENSE for licensing information */
00006 
00012 #ifndef _TOR_RENDCLIENT_H
00013 #define _TOR_RENDCLIENT_H
00014 
00015 void rend_client_purge_state(void);
00016 
00017 void rend_client_introcirc_has_opened(origin_circuit_t *circ);
00018 void rend_client_rendcirc_has_opened(origin_circuit_t *circ);
00019 int rend_client_introduction_acked(origin_circuit_t *circ,
00020                                    const uint8_t *request,
00021                                    size_t request_len);
00022 void rend_client_refetch_v2_renddesc(const rend_data_t *rend_query);
00023 void rend_client_cancel_descriptor_fetches(void);
00024 void rend_client_purge_last_hid_serv_requests(void);
00025 
00026 #define INTRO_POINT_FAILURE_GENERIC 0
00027 #define INTRO_POINT_FAILURE_TIMEOUT 1
00028 #define INTRO_POINT_FAILURE_UNREACHABLE 2
00029 
00030 int rend_client_report_intro_point_failure(extend_info_t *failed_intro,
00031                                            const rend_data_t *rend_query,
00032                                            unsigned int failure_type);
00033 
00034 int rend_client_rendezvous_acked(origin_circuit_t *circ,
00035                                  const uint8_t *request,
00036                                  size_t request_len);
00037 int rend_client_receive_rendezvous(origin_circuit_t *circ,
00038                                    const uint8_t *request,
00039                                    size_t request_len);
00040 void rend_client_desc_trynow(const char *query);
00041 
00042 void rend_client_note_connection_attempt_ended(const char *onion_address);
00043 
00044 extend_info_t *rend_client_get_random_intro(const rend_data_t *rend_query);
00045 int rend_client_any_intro_points_usable(const rend_cache_entry_t *entry);
00046 
00047 int rend_client_send_introduction(origin_circuit_t *introcirc,
00048                                   origin_circuit_t *rendcirc);
00049 int rend_parse_service_authorization(const or_options_t *options,
00050                                      int validate_only);
00051 rend_service_authorization_t *rend_client_lookup_service_authorization(
00052                                                 const char *onion_address);
00053 void rend_service_authorization_free_all(void);
00054 rend_data_t *rend_data_dup(const rend_data_t *request);
00055 
00056 #endif
00057