aboutsummaryrefslogtreecommitdiff
path: root/src/or/routerparse.h
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2010-07-22 12:09:49 +0200
committerSebastian Hahn <sebastian@torproject.org>2010-07-27 07:58:16 +0200
commit7d4c027fb064b6163fb4b74fc1b3f86fff1335c9 (patch)
treebf7e8b001f4af3e93bc5d27a55c95f9c4d7956d5 /src/or/routerparse.h
parentbec1c838ca96b69d69b3c275b4703fa539c8c106 (diff)
downloadtor-7d4c027fb064b6163fb4b74fc1b3f86fff1335c9.tar.gz
tor-7d4c027fb064b6163fb4b74fc1b3f86fff1335c9.zip
Create dirserv.h
Diffstat (limited to 'src/or/routerparse.h')
-rw-r--r--src/or/routerparse.h93
1 files changed, 93 insertions, 0 deletions
diff --git a/src/or/routerparse.h b/src/or/routerparse.h
new file mode 100644
index 0000000000..e615636465
--- /dev/null
+++ b/src/or/routerparse.h
@@ -0,0 +1,93 @@
+/* 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 geoip.h
+ * \brief Header file for geoip functions
+ **/
+
+#ifndef _TOR_GEOIP_H
+#define _TOR_GEOIP_H
+
+#define MAX_STATUS_TAG_LEN 32
+
+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