]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Create routerparse.h
authorSebastian Hahn <sebastian@torproject.org>
Fri, 23 Jul 2010 21:23:43 +0000 (23:23 +0200)
committerSebastian Hahn <sebastian@torproject.org>
Tue, 27 Jul 2010 08:00:46 +0000 (10:00 +0200)
20 files changed:
src/or/circuitbuild.c
src/or/connection.c
src/or/control.c
src/or/directory.c
src/or/dirserv.c
src/or/dirvote.c
src/or/main.c
src/or/microdesc.c
src/or/networkstatus.c
src/or/or.h
src/or/policies.c
src/or/relay.c
src/or/rendcommon.c
src/or/rendservice.c
src/or/router.c
src/or/routerlist.c
src/or/routerparse.c
src/or/routerparse.h
src/test/test.c
src/test/test_dir.c

index fc3dbda13d0505d070db692d026c48187d541bfa..5bb9d70d5d981239e5ceae1241abd9691ac6fbee 100644 (file)
@@ -29,6 +29,7 @@
 #include "rephist.h"
 #include "router.h"
 #include "routerlist.h"
+#include "routerparse.h"
 #include "crypto.h"
 #undef log
 #include <math.h>
index 02acd97e75fd2e8fd9a29de333af65bc7287aa1d..55d2fa81466c88f6af2680e6a466d14204fc3c8a 100644 (file)
@@ -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,
index ffcbcfdcd36d4d71c823f1b65e06bf3f1d0abace..7cbb1bd1f66d6f3893467d136be65afe438d04b9 100644 (file)
@@ -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. */
index c1e68bf4531885a781ee87a9541718a20b7d5243..a3e575ac97fde0711cf5fdd719ce2d5e1142b454 100644 (file)
@@ -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
index 397a0c866f291a57eae896af6217c048bc992619..86cd1861110a33b5c8cee1649a1ae793803fcb80 100644 (file)
@@ -20,6 +20,7 @@
 #include "rephist.h"
 #include "router.h"
 #include "routerlist.h"
+#include "routerparse.h"
 
 /**
  * \file dirserv.c
index 2448a6a19873b4a7f6483fb5ccd7fffbe398ea42..fd4d742ccb6563862f7f46197cd20a6553e95bfe 100644 (file)
@@ -15,6 +15,7 @@
 #include "rephist.h"
 #include "router.h"
 #include "routerlist.h"
+#include "routerparse.h"
 
 /**
  * \file dirvote.c
index 92c60e7e8c0914b406154d883483b4df0f0582be..ff674f386ac39a71fdb048a0b1f32bb3aa1ed0f4 100644 (file)
@@ -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>
index ead0f9ffaf1066be73b315e1017ce2fac2c51c6a..f56ccd9ee27fb43b9c6f480f7087a9fec6937563 100644 (file)
@@ -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
index c763e23a87fa94ce0dfa22024dd55b599e36b02f..a9a9c78b8963f2ebc5b7c043ccdbd9e73848dad5 100644 (file)
@@ -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. */
 
index f51da60f71cdabf0bed669ec40af793e51761a8f..44fdd6977e02da44261e346638b5f133c81d4b6c 100644 (file)
@@ -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
 
index cd6307daa61a2e2326e5bf41ac10e4c1f9867216..db3c6d886be94dc4571de1fdf4ae581702d1946c 100644 (file)
@@ -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. */
index a40013ab475f97c008c1dec472b45f0f26d91d9a..22ecdaafa0d1b1665b14d7ceb4728d587cc8cbff 100644 (file)
@@ -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,
index 8a4de3cca6f6d61d3a6f20d090383a37f06e98e2..ec6680b1e66e18395f8f51cf6803542aae6e1f0a 100644 (file)
@@ -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
index f7ab60dbf921bc0278c3aa07a6a66c17f9d4e9f9..b0d791529b840da0e62fc777dde5d45c829a4f15 100644 (file)
@@ -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);
index 36e2d2608c5b8239e4d7a522bf077c6342d69954..978078bf78c8824d32fe743a74ce0ea3f8d091b3 100644 (file)
@@ -23,6 +23,7 @@
 #include "rephist.h"
 #include "router.h"
 #include "routerlist.h"
+#include "routerparse.h"
 
 /**
  * \file router.c
index 7f47e7128aa88f24d486ca1232d5717295332cf8..146040ac6814db681bbb421b7ea512ffcc80eb78 100644 (file)
@@ -29,6 +29,7 @@
 #include "rephist.h"
 #include "router.h"
 #include "routerlist.h"
+#include "routerparse.h"
 
 // #define DEBUG_ROUTERLIST
 
index 88fbdbf6c2d34bcc1f5e3722da34121a1ba3db52..96749e5a748dea4ecdd96ee702cde22f667bf95a 100644 (file)
@@ -21,6 +21,7 @@
 #include "microdesc.h"
 #include "networkstatus.h"
 #include "rephist.h"
+#include "routerparse.h"
 #undef log
 #include <math.h>
 
index e615636465d9e3dc1dcc8d301c0f3ed69f7b5aa8..e246dbe9ca8e35e17eac641f1ff9f16d7ec76bf6 100644 (file)
@@ -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
+
index 8bb694dbaeac56757342312d3b08ff4d060c3348..755d1233f68157add52bcf391e4e072d1cb04c6f 100644 (file)
@@ -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>
index 628dac7cf95b287bf918c10f557b0fe6e0c09907..a129bf9777213fad20a6a23b2d60d1037aa335d4 100644 (file)
@@ -14,6 +14,7 @@
 #include "networkstatus.h"
 #include "router.h"
 #include "routerlist.h"
+#include "routerparse.h"
 #include "test.h"
 
 static void