diff options
-rw-r--r-- | src/or/circuitbuild.c | 1 | ||||
-rw-r--r-- | src/or/connection.c | 1 | ||||
-rw-r--r-- | src/or/control.c | 1 | ||||
-rw-r--r-- | src/or/directory.c | 1 | ||||
-rw-r--r-- | src/or/dirserv.c | 1 | ||||
-rw-r--r-- | src/or/dirvote.c | 1 | ||||
-rw-r--r-- | src/or/main.c | 1 | ||||
-rw-r--r-- | src/or/microdesc.c | 1 | ||||
-rw-r--r-- | src/or/networkstatus.c | 1 | ||||
-rw-r--r-- | src/or/or.h | 75 | ||||
-rw-r--r-- | src/or/policies.c | 1 | ||||
-rw-r--r-- | src/or/relay.c | 1 | ||||
-rw-r--r-- | src/or/rendcommon.c | 1 | ||||
-rw-r--r-- | src/or/rendservice.c | 1 | ||||
-rw-r--r-- | src/or/router.c | 1 | ||||
-rw-r--r-- | src/or/routerlist.c | 1 | ||||
-rw-r--r-- | src/or/routerparse.c | 1 | ||||
-rw-r--r-- | src/or/routerparse.h | 11 | ||||
-rw-r--r-- | src/test/test.c | 1 | ||||
-rw-r--r-- | src/test/test_dir.c | 1 |
20 files changed, 23 insertions, 81 deletions
diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index fc3dbda13d..5bb9d70d5d 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -29,6 +29,7 @@ #include "rephist.h" #include "router.h" #include "routerlist.h" +#include "routerparse.h" #include "crypto.h" #undef log #include <math.h> diff --git a/src/or/connection.c b/src/or/connection.c index 02acd97e75..55d2fa8146 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -34,6 +34,7 @@ #include "rendcommon.h" #include "rephist.h" #include "router.h" +#include "routerparse.h" static connection_t *connection_create_listener( struct sockaddr *listensockaddr, diff --git a/src/or/control.c b/src/or/control.c index ffcbcfdcd3..7cbb1bd1f6 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -30,6 +30,7 @@ #include "reasons.h" #include "router.h" #include "routerlist.h" +#include "routerparse.h" /** Yield true iff <b>s</b> is the state of a control_connection_t that has * finished authentication and is accepting commands. */ diff --git a/src/or/directory.c b/src/or/directory.c index c1e68bf453..a3e575ac97 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -22,6 +22,7 @@ #include "rephist.h" #include "router.h" #include "routerlist.h" +#include "routerparse.h" #if defined(EXPORTMALLINFO) && defined(HAVE_MALLOC_H) && defined(HAVE_MALLINFO) #ifndef OPENBSD diff --git a/src/or/dirserv.c b/src/or/dirserv.c index 397a0c866f..86cd186111 100644 --- a/src/or/dirserv.c +++ b/src/or/dirserv.c @@ -20,6 +20,7 @@ #include "rephist.h" #include "router.h" #include "routerlist.h" +#include "routerparse.h" /** * \file dirserv.c diff --git a/src/or/dirvote.c b/src/or/dirvote.c index 2448a6a198..fd4d742ccb 100644 --- a/src/or/dirvote.c +++ b/src/or/dirvote.c @@ -15,6 +15,7 @@ #include "rephist.h" #include "router.h" #include "routerlist.h" +#include "routerparse.h" /** * \file dirvote.c diff --git a/src/or/main.c b/src/or/main.c index 92c60e7e8c..ff674f386a 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -43,6 +43,7 @@ #include "rephist.h" #include "router.h" #include "routerlist.h" +#include "routerparse.h" #ifdef USE_DMALLOC #include <dmalloc.h> #include <openssl/crypto.h> diff --git a/src/or/microdesc.c b/src/or/microdesc.c index ead0f9ffaf..f56ccd9ee2 100644 --- a/src/or/microdesc.c +++ b/src/or/microdesc.c @@ -4,6 +4,7 @@ #include "or.h" #include "config.h" #include "microdesc.h" +#include "routerparse.h" /** A data structure to hold a bunch of cached microdescriptors. There are * two active files in the cache: a "cache file" that we mmap, and a "journal diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c index c763e23a87..a9a9c78b89 100644 --- a/src/or/networkstatus.c +++ b/src/or/networkstatus.c @@ -22,6 +22,7 @@ #include "relay.h" #include "router.h" #include "routerlist.h" +#include "routerparse.h" /* For tracking v2 networkstatus documents. Only caches do this now. */ diff --git a/src/or/or.h b/src/or/or.h index f51da60f71..44fdd6977e 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -3494,80 +3494,5 @@ typedef struct tor_version_t { char git_tag[DIGEST_LEN]; } tor_version_t; -int router_get_router_hash(const char *s, size_t s_len, char *digest); -int router_get_dir_hash(const char *s, char *digest); -int router_get_runningrouters_hash(const char *s, char *digest); -int router_get_networkstatus_v2_hash(const char *s, char *digest); -int router_get_networkstatus_v3_hash(const char *s, char *digest, - digest_algorithm_t algorithm); -int router_get_networkstatus_v3_hashes(const char *s, digests_t *digests); -int router_get_extrainfo_hash(const char *s, char *digest); -int router_append_dirobj_signature(char *buf, size_t buf_len, - const char *digest, - size_t digest_len, - crypto_pk_env_t *private_key); -int router_parse_list_from_string(const char **s, const char *eos, - smartlist_t *dest, - saved_location_t saved_location, - int is_extrainfo, - int allow_annotations, - const char *prepend_annotations); -int router_parse_routerlist_from_directory(const char *s, - routerlist_t **dest, - crypto_pk_env_t *pkey, - int check_version, - int write_to_cache); -int router_parse_runningrouters(const char *str); -int router_parse_directory(const char *str); -routerinfo_t *router_parse_entry_from_string(const char *s, const char *end, - int cache_copy, - int allow_annotations, - const char *prepend_annotations); -extrainfo_t *extrainfo_parse_entry_from_string(const char *s, const char *end, - int cache_copy, struct digest_ri_map_t *routermap); -addr_policy_t *router_parse_addr_policy_item_from_string(const char *s, - int assume_action); -version_status_t tor_version_is_obsolete(const char *myversion, - const char *versionlist); -int tor_version_parse(const char *s, tor_version_t *out); -int tor_version_as_new_as(const char *platform, const char *cutoff); -int tor_version_compare(tor_version_t *a, tor_version_t *b); -void sort_version_list(smartlist_t *lst, int remove_duplicates); -void assert_addr_policy_ok(smartlist_t *t); -void dump_distinct_digest_count(int severity); - -int compare_routerstatus_entries(const void **_a, const void **_b); -networkstatus_v2_t *networkstatus_v2_parse_from_string(const char *s); -int networkstatus_verify_bw_weights(networkstatus_t *ns); -networkstatus_t *networkstatus_parse_vote_from_string(const char *s, - const char **eos_out, - networkstatus_type_t ns_type); -ns_detached_signatures_t *networkstatus_parse_detached_signatures( - const char *s, const char *eos); - -smartlist_t *microdescs_parse_from_string(const char *s, const char *eos, - int allow_annotations, - int copy_body); - -authority_cert_t *authority_cert_parse_from_string(const char *s, - const char **end_of_string); -int rend_parse_v2_service_descriptor(rend_service_descriptor_t **parsed_out, - char *desc_id_out, - char **intro_points_encrypted_out, - size_t *intro_points_encrypted_size_out, - size_t *encoded_size_out, - const char **next_out, const char *desc); -int rend_decrypt_introduction_points(char **ipos_decrypted, - size_t *ipos_decrypted_size, - const char *descriptor_cookie, - const char *ipos_encrypted, - size_t ipos_encrypted_size); -int rend_parse_introduction_points(rend_service_descriptor_t *parsed, - const char *intro_points_encoded, - size_t intro_points_encoded_size); -int rend_parse_client_keys(strmap_t *parsed_clients, const char *str); - -void tor_gettimeofday_cache_clear(void); - #endif diff --git a/src/or/policies.c b/src/or/policies.c index cd6307daa6..db3c6d886b 100644 --- a/src/or/policies.c +++ b/src/or/policies.c @@ -12,6 +12,7 @@ #include "config.h" #include "dirserv.h" #include "policies.h" +#include "routerparse.h" #include "ht.h" /** Policy that addresses for incoming SOCKS connections must match. */ diff --git a/src/or/relay.c b/src/or/relay.c index a40013ab47..22ecdaafa0 100644 --- a/src/or/relay.c +++ b/src/or/relay.c @@ -29,6 +29,7 @@ #include "relay.h" #include "rendcommon.h" #include "routerlist.h" +#include "routerparse.h" static int relay_crypt(circuit_t *circ, cell_t *cell, cell_direction_t cell_direction, diff --git a/src/or/rendcommon.c b/src/or/rendcommon.c index 8a4de3cca6..ec6680b1e6 100644 --- a/src/or/rendcommon.c +++ b/src/or/rendcommon.c @@ -17,6 +17,7 @@ #include "rendservice.h" #include "rephist.h" #include "routerlist.h" +#include "routerparse.h" /** Return 0 if one and two are the same service ids, else -1 or 1 */ int diff --git a/src/or/rendservice.c b/src/or/rendservice.c index f7ab60dbf9..b0d791529b 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -21,6 +21,7 @@ #include "relay.h" #include "rephist.h" #include "routerlist.h" +#include "routerparse.h" static origin_circuit_t *find_intro_circuit(rend_intro_point_t *intro, const char *pk_digest); diff --git a/src/or/router.c b/src/or/router.c index 36e2d2608c..978078bf78 100644 --- a/src/or/router.c +++ b/src/or/router.c @@ -23,6 +23,7 @@ #include "rephist.h" #include "router.h" #include "routerlist.h" +#include "routerparse.h" /** * \file router.c diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 7f47e7128a..146040ac68 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -29,6 +29,7 @@ #include "rephist.h" #include "router.h" #include "routerlist.h" +#include "routerparse.h" // #define DEBUG_ROUTERLIST diff --git a/src/or/routerparse.c b/src/or/routerparse.c index 88fbdbf6c2..96749e5a74 100644 --- a/src/or/routerparse.c +++ b/src/or/routerparse.c @@ -21,6 +21,7 @@ #include "microdesc.h" #include "networkstatus.h" #include "rephist.h" +#include "routerparse.h" #undef log #include <math.h> diff --git a/src/or/routerparse.h b/src/or/routerparse.h index e615636465..e246dbe9ca 100644 --- a/src/or/routerparse.h +++ b/src/or/routerparse.h @@ -5,14 +5,12 @@ /* See LICENSE for licensing information */ /** - * \file geoip.h - * \brief Header file for geoip functions + * \file routerpase.h + * \brief Header file for router information parsing. **/ -#ifndef _TOR_GEOIP_H -#define _TOR_GEOIP_H - -#define MAX_STATUS_TAG_LEN 32 +#ifndef _TOR_ROUTERPARSE_H +#define _TOR_ROUTERPARSE_H int router_get_router_hash(const char *s, size_t s_len, char *digest); int router_get_dir_hash(const char *s, char *digest); @@ -91,3 +89,4 @@ int rend_parse_client_keys(strmap_t *parsed_clients, const char *str); void tor_gettimeofday_cache_clear(void); #endif + diff --git a/src/test/test.c b/src/test/test.c index 8bb694dbae..755d1233f6 100644 --- a/src/test/test.c +++ b/src/test/test.c @@ -56,6 +56,7 @@ double fabs(double x); #include "onion.h" #include "policies.h" #include "rephist.h" +#include "routerparse.h" #ifdef USE_DMALLOC #include <dmalloc.h> diff --git a/src/test/test_dir.c b/src/test/test_dir.c index 628dac7cf9..a129bf9777 100644 --- a/src/test/test_dir.c +++ b/src/test/test_dir.c @@ -14,6 +14,7 @@ #include "networkstatus.h" #include "router.h" #include "routerlist.h" +#include "routerparse.h" #include "test.h" static void |