tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

routerlist_st.h (1654B)


      1 /* Copyright (c) 2001 Matej Pfajfar.
      2 * Copyright (c) 2001-2004, Roger Dingledine.
      3 * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
      4 * Copyright (c) 2007-2021, The Tor Project, Inc. */
      5 /* See LICENSE for licensing information */
      6 
      7 /**
      8 * @file routerlist_st.h
      9 * @brief Router descriptor list structure.
     10 **/
     11 
     12 #ifndef ROUTERLIST_ST_H
     13 #define ROUTERLIST_ST_H
     14 
     15 #include "feature/nodelist/desc_store_st.h"
     16 
     17 /** Contents of a directory of onion routers. */
     18 struct routerlist_t {
     19  /** Map from server identity digest to a member of routers. */
     20  struct digest_ri_map_t *identity_map;
     21  /** Map from server descriptor digest to a signed_descriptor_t from
     22   * routers or old_routers. */
     23  struct digest_sd_map_t *desc_digest_map;
     24  /** Map from extra-info digest to an extrainfo_t.  Only exists for
     25   * routers in routers or old_routers. */
     26  struct digest_ei_map_t *extra_info_map;
     27  /** Map from extra-info digests to a signed_descriptor_t for a router
     28   * descriptor having that extra-info digest.  Only exists for
     29   * routers in routers or old_routers. */
     30  struct digest_sd_map_t *desc_by_eid_map;
     31  /** List of routerinfo_t for all currently live routers we know. */
     32  smartlist_t *routers;
     33  /** List of signed_descriptor_t for older router descriptors we're
     34   * caching. */
     35  smartlist_t *old_routers;
     36  /** Store holding server descriptors.  If present, any router whose
     37   * cache_info.saved_location == SAVED_IN_CACHE is stored in this file
     38   * starting at cache_info.saved_offset */
     39  desc_store_t desc_store;
     40  /** Store holding extra-info documents. */
     41  desc_store_t extrainfo_store;
     42 };
     43 
     44 #endif /* !defined(ROUTERLIST_ST_H) */