From 7caa8351b82c764203694dd18a33c17ba1b319e0 Mon Sep 17 00:00:00 2001 From: Sebastian Hahn Date: Thu, 22 Jul 2010 00:13:51 +0200 Subject: [PATCH] Create rendclient.h --- src/or/circuitlist.c | 1 + src/or/circuituse.c | 1 + src/or/config.c | 1 + src/or/connection.c | 1 + src/or/connection_edge.c | 1 + src/or/directory.c | 1 + src/or/main.c | 1 + src/or/or.h | 26 -------------------------- src/or/rendclient.c | 1 + src/or/rendclient.h | 40 ++++++++++++++++++++++++++++++++++++++++ src/or/rendcommon.c | 1 + src/or/rendservice.c | 1 + 12 files changed, 50 insertions(+), 26 deletions(-) create mode 100644 src/or/rendclient.h diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c index 2de5b4e901..b1272dd7f1 100644 --- a/src/or/circuitlist.c +++ b/src/or/circuitlist.c @@ -10,6 +10,7 @@ **/ #include "or.h" +#include "rendclient.h" #include "rendcommon.h" #include "routerlist.h" #include "ht.h" diff --git a/src/or/circuituse.c b/src/or/circuituse.c index c76cbd4cca..5621e4fe7b 100644 --- a/src/or/circuituse.c +++ b/src/or/circuituse.c @@ -10,6 +10,7 @@ **/ #include "or.h" +#include "rendclient.h" #include "rendcommon.h" #include "router.h" #include "routerlist.h" diff --git a/src/or/config.c b/src/or/config.c index 8cd719a75b..b4d863700d 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -13,6 +13,7 @@ #include "or.h" #include "geoip.h" +#include "rendclient.h" #include "router.h" #include "routerlist.h" #ifdef MS_WINDOWS diff --git a/src/or/connection.c b/src/or/connection.c index 2a3cdab8cf..e8b78eab54 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -13,6 +13,7 @@ #include "or.h" #include "dnsserv.h" #include "geoip.h" +#include "rendclient.h" #include "rendcommon.h" #include "router.h" diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index ee271ecb57..4adb250ebf 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -11,6 +11,7 @@ #include "or.h" #include "dnsserv.h" +#include "rendclient.h" #include "rendcommon.h" #include "router.h" #include "routerlist.h" diff --git a/src/or/directory.c b/src/or/directory.c index d81a3db704..d1bb78f20f 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -5,6 +5,7 @@ #include "or.h" #include "geoip.h" +#include "rendclient.h" #include "rendcommon.h" #include "router.h" #include "routerlist.h" diff --git a/src/or/main.c b/src/or/main.c index 12f1c9eaa4..3bc282330a 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -14,6 +14,7 @@ #include "or.h" #include "dnsserv.h" #include "geoip.h" +#include "rendclient.h" #include "rendcommon.h" #include "router.h" #include "routerlist.h" diff --git a/src/or/or.h b/src/or/or.h index d1c15e2d12..7c2bf077f6 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -4612,32 +4612,6 @@ void rep_hist_buffer_stats_add_circ(circuit_t *circ, time_t end_of_interval); void rep_hist_buffer_stats_write(time_t now); -/********************************* rendclient.c ***************************/ - -void rend_client_introcirc_has_opened(origin_circuit_t *circ); -void rend_client_rendcirc_has_opened(origin_circuit_t *circ); -int rend_client_introduction_acked(origin_circuit_t *circ, const char *request, - size_t request_len); -void rend_client_refetch_v2_renddesc(const rend_data_t *rend_query); -int rend_client_remove_intro_point(extend_info_t *failed_intro, - const rend_data_t *rend_query); -int rend_client_rendezvous_acked(origin_circuit_t *circ, const char *request, - size_t request_len); -int rend_client_receive_rendezvous(origin_circuit_t *circ, const char *request, - size_t request_len); -void rend_client_desc_trynow(const char *query); - -extend_info_t *rend_client_get_random_intro(const rend_data_t *rend_query); - -int rend_client_send_introduction(origin_circuit_t *introcirc, - origin_circuit_t *rendcirc); -int rend_parse_service_authorization(or_options_t *options, - int validate_only); -rend_service_authorization_t *rend_client_lookup_service_authorization( - const char *onion_address); -void rend_service_authorization_free_all(void); -rend_data_t *rend_data_dup(const rend_data_t *request); - /********************************* rendcommon.c ***************************/ /** Hidden-service side configuration of client authorization. */ diff --git a/src/or/rendclient.c b/src/or/rendclient.c index 880182f90a..2313dcefd2 100644 --- a/src/or/rendclient.c +++ b/src/or/rendclient.c @@ -8,6 +8,7 @@ **/ #include "or.h" +#include "rendclient.h" #include "rendcommon.h" #include "routerlist.h" diff --git a/src/or/rendclient.h b/src/or/rendclient.h new file mode 100644 index 0000000000..4e6587b850 --- /dev/null +++ b/src/or/rendclient.h @@ -0,0 +1,40 @@ +/* Copyright (c) 2001 Matej Pfajfar. + * Copyright (c) 2001-2004, Roger Dingledine. + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2010, The Tor Project, Inc. */ +/* See LICENSE for licensing information */ + +/** + * \file rendclient.h + * \brief Header file for client rend functions + **/ + +#ifndef _TOR_RENDCLIENT_H +#define _TOR_RENDCLIENT_H + +void rend_client_introcirc_has_opened(origin_circuit_t *circ); +void rend_client_rendcirc_has_opened(origin_circuit_t *circ); +int rend_client_introduction_acked(origin_circuit_t *circ, const char *request, + size_t request_len); +void rend_client_refetch_v2_renddesc(const rend_data_t *rend_query); +int rend_client_remove_intro_point(extend_info_t *failed_intro, + const rend_data_t *rend_query); +int rend_client_rendezvous_acked(origin_circuit_t *circ, const char *request, + size_t request_len); +int rend_client_receive_rendezvous(origin_circuit_t *circ, const char *request, + size_t request_len); +void rend_client_desc_trynow(const char *query); + +extend_info_t *rend_client_get_random_intro(const rend_data_t *rend_query); + +int rend_client_send_introduction(origin_circuit_t *introcirc, + origin_circuit_t *rendcirc); +int rend_parse_service_authorization(or_options_t *options, + int validate_only); +rend_service_authorization_t *rend_client_lookup_service_authorization( + const char *onion_address); +void rend_service_authorization_free_all(void); +rend_data_t *rend_data_dup(const rend_data_t *request); + +#endif + diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index 891973dfc9..e4a2d61c3a 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -9,6 +9,7 @@ **/ #include "or.h" +#include "rendclient.h" #include "rendcommon.h" #include "routerlist.h" diff --git a/src/or/rendservice.c b/src/or/rendservice.c index ce37a470cf..839d501f23 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -8,6 +8,7 @@ **/ #include "or.h" +#include "rendclient.h" #include "rendcommon.h" #include "router.h" #include "routerlist.h" -- 2.11.4.GIT