#include "rend_authorized_client_st.h"
#include "rend_encoded_v2_service_descriptor_st.h"
#include "rend_service_descriptor_st.h"
+#include "routerlist_st.h"
#include "socks_request_st.h"
#ifndef _WIN32
--- /dev/null
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2017, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+#ifndef DESC_STORE_ST_H
+#define DESC_STORE_ST_H
+
+/** A 'store' is a set of descriptors saved on disk, with accompanying
+ * journal, mmaped as needed, rebuilt as needed. */
+struct desc_store_t {
+ /** Filename (within DataDir) for the store. We append .tmp to this
+ * filename for a temporary file when rebuilding the store, and .new to this
+ * filename for the journal. */
+ const char *fname_base;
+ /** Human-readable description of what this store contains. */
+ const char *description;
+
+ tor_mmap_t *mmap; /**< A mmap for the main file in the store. */
+
+ store_type_t type; /**< What's stored in this store? */
+
+ /** The size of the router log, in bytes. */
+ size_t journal_len;
+ /** The size of the router store, in bytes. */
+ size_t store_len;
+ /** Total bytes dropped since last rebuild: this is space currently
+ * used in the cache and the journal that could be freed by a rebuild. */
+ size_t bytes_dropped;
+};
+
+#endif
+
#include "networkstatus_voter_info_st.h"
#include "node_st.h"
#include "ns_detached_signatures_st.h"
+#include "routerlist_st.h"
#include "vote_microdesc_hash_st.h"
#include "vote_routerstatus_st.h"
#include "vote_timing_st.h"
#include "dir_connection_st.h"
#include "node_st.h"
+#include "routerlist_st.h"
#include "tor_version_st.h"
#include "vote_routerstatus_st.h"
src/or/crypt_path_st.h \
src/or/crypt_path_reference_st.h \
src/or/cpuworker.h \
+ src/or/desc_store_st.h \
src/or/directory.h \
src/or/dirserv.h \
src/or/dir_connection_st.h \
src/or/router.h \
src/or/routerkeys.h \
src/or/routerlist.h \
+ src/or/routerlist_st.h \
src/or/routerkeys.h \
src/or/routerset.h \
src/or/routerparse.h \
#include "networkstatus_voter_info_st.h"
#include "ns_detached_signatures_st.h"
#include "node_st.h"
+#include "routerlist_st.h"
#include "vote_microdesc_hash_st.h"
#include "vote_routerstatus_st.h"
#include "dir_server_st.h"
#include "networkstatus_st.h"
#include "node_st.h"
+#include "routerlist_st.h"
static void nodelist_drop_node(node_t *node, int remove_from_ht);
#define node_free(val) \
EXTRAINFO_STORE = 1
} store_type_t;
-/** A 'store' is a set of descriptors saved on disk, with accompanying
- * journal, mmaped as needed, rebuilt as needed. */
-typedef struct desc_store_t {
- /** Filename (within DataDir) for the store. We append .tmp to this
- * filename for a temporary file when rebuilding the store, and .new to this
- * filename for the journal. */
- const char *fname_base;
- /** Human-readable description of what this store contains. */
- const char *description;
-
- tor_mmap_t *mmap; /**< A mmap for the main file in the store. */
-
- store_type_t type; /**< What's stored in this store? */
-
- /** The size of the router log, in bytes. */
- size_t journal_len;
- /** The size of the router store, in bytes. */
- size_t store_len;
- /** Total bytes dropped since last rebuild: this is space currently
- * used in the cache and the journal that could be freed by a rebuild. */
- size_t bytes_dropped;
-} desc_store_t;
-
-/** Contents of a directory of onion routers. */
-typedef struct {
- /** Map from server identity digest to a member of routers. */
- struct digest_ri_map_t *identity_map;
- /** Map from server descriptor digest to a signed_descriptor_t from
- * routers or old_routers. */
- struct digest_sd_map_t *desc_digest_map;
- /** Map from extra-info digest to an extrainfo_t. Only exists for
- * routers in routers or old_routers. */
- struct digest_ei_map_t *extra_info_map;
- /** Map from extra-info digests to a signed_descriptor_t for a router
- * descriptor having that extra-info digest. Only exists for
- * routers in routers or old_routers. */
- struct digest_sd_map_t *desc_by_eid_map;
- /** List of routerinfo_t for all currently live routers we know. */
- smartlist_t *routers;
- /** List of signed_descriptor_t for older router descriptors we're
- * caching. */
- smartlist_t *old_routers;
- /** Store holding server descriptors. If present, any router whose
- * cache_info.saved_location == SAVED_IN_CACHE is stored in this file
- * starting at cache_info.saved_offset */
- desc_store_t desc_store;
- /** Store holding extra-info documents. */
- desc_store_t extrainfo_store;
-} routerlist_t;
+typedef struct desc_store_t desc_store_t;
+typedef struct routerlist_t routerlist_t;
/** Information on router used when extending a circuit. We don't need a
* full routerinfo_t to extend: we only need addr:port:keyid to build an OR
#include "networkstatus_st.h"
#include "networkstatus_voter_info_st.h"
#include "node_st.h"
+#include "routerlist_st.h"
#include "vote_routerstatus_st.h"
// #define DEBUG_ROUTERLIST
--- /dev/null
+/* Copyright (c) 2001 Matej Pfajfar.
+ * Copyright (c) 2001-2004, Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2017, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+#ifndef ROUTERLIST_ST_H
+#define ROUTERLIST_ST_H
+
+#include "desc_store_st.h"
+
+/** Contents of a directory of onion routers. */
+struct routerlist_t {
+ /** Map from server identity digest to a member of routers. */
+ struct digest_ri_map_t *identity_map;
+ /** Map from server descriptor digest to a signed_descriptor_t from
+ * routers or old_routers. */
+ struct digest_sd_map_t *desc_digest_map;
+ /** Map from extra-info digest to an extrainfo_t. Only exists for
+ * routers in routers or old_routers. */
+ struct digest_ei_map_t *extra_info_map;
+ /** Map from extra-info digests to a signed_descriptor_t for a router
+ * descriptor having that extra-info digest. Only exists for
+ * routers in routers or old_routers. */
+ struct digest_sd_map_t *desc_by_eid_map;
+ /** List of routerinfo_t for all currently live routers we know. */
+ smartlist_t *routers;
+ /** List of signed_descriptor_t for older router descriptors we're
+ * caching. */
+ smartlist_t *old_routers;
+ /** Store holding server descriptors. If present, any router whose
+ * cache_info.saved_location == SAVED_IN_CACHE is stored in this file
+ * starting at cache_info.saved_offset */
+ desc_store_t desc_store;
+ /** Store holding extra-info documents. */
+ desc_store_t extrainfo_store;
+};
+
+#endif
+
#include "rend_authorized_client_st.h"
#include "rend_intro_point_st.h"
#include "rend_service_descriptor_st.h"
+#include "routerlist_st.h"
#include "tor_version_st.h"
#include "vote_microdesc_hash_st.h"
#include "vote_routerstatus_st.h"
int allow_annotations,
const char *prepend_annotations,
int *can_dl_again_out);
+struct digest_ri_map_t;
extrainfo_t *extrainfo_parse_entry_from_string(const char *s, const char *end,
int cache_copy, struct digest_ri_map_t *routermap,
int *can_dl_again_out);
#include "networkstatus_voter_info_st.h"
#include "ns_detached_signatures_st.h"
#include "port_cfg_st.h"
+#include "routerlist_st.h"
#include "tor_version_st.h"
#include "vote_microdesc_hash_st.h"
#include "vote_routerstatus_st.h"
#include "dir_server_st.h"
#include "networkstatus_st.h"
#include "rend_encoded_v2_service_descriptor_st.h"
+#include "routerlist_st.h"
#ifdef _WIN32
/* For mkdir() */
#include "connection_st.h"
#include "node_st.h"
#include "origin_circuit_st.h"
+#include "routerlist_st.h"
#include "test.h"
#include "test_helpers.h"