Tor  0.4.6.0-alpha-dev
microdesc.h
Go to the documentation of this file.
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-2020, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 /**
8  * \file microdesc.h
9  * \brief Header file for microdesc.c.
10  **/
11 
12 #ifndef TOR_MICRODESC_H
13 #define TOR_MICRODESC_H
14 
16 
17 void microdesc_check_counts(void);
18 
20  const char *s, const char *eos, saved_location_t where,
21  int no_save, time_t listed_at,
22  smartlist_t *requested_digests256);
24  smartlist_t *descriptors, saved_location_t where,
25  int no_save);
26 
27 void microdesc_cache_clean(microdesc_cache_t *cache, time_t cutoff, int force);
28 int microdesc_cache_rebuild(microdesc_cache_t *cache, int force);
31 
33  const char *d);
34 
36  microdesc_cache_t *cache,
37  int downloadable_only,
38  digest256map_t *skip);
39 
40 void microdesc_free_(microdesc_t *md, const char *fname, int line);
41 #define microdesc_free(md) do { \
42  microdesc_free_((md), __FILE__, __LINE__); \
43  (md) = NULL; \
44  } while (0)
45 void microdesc_free_all(void);
46 
47 void update_microdesc_downloads(time_t now);
49 
51 int we_fetch_microdescriptors(const or_options_t *options);
52 int we_fetch_router_descriptors(const or_options_t *options);
54 
55 void microdesc_note_outdated_dirserver(const char *relay_digest);
56 int microdesc_relay_is_outdated_dirserver(const char *relay_digest);
58 
59 #endif /* !defined(TOR_MICRODESC_H) */
60 
microdesc_t
Definition: microdesc_st.h:27
we_fetch_router_descriptors
int we_fetch_router_descriptors(const or_options_t *options)
Definition: microdesc.c:1075
microdesc_reset_outdated_dirservers_list
void microdesc_reset_outdated_dirservers_list(void)
Definition: microdesc.c:186
microdescs_add_to_cache
smartlist_t * microdescs_add_to_cache(microdesc_cache_t *cache, const char *s, const char *eos, saved_location_t where, int no_save, time_t listed_at, smartlist_t *requested_digests256)
Definition: microdesc.c:293
update_microdesc_downloads
void update_microdesc_downloads(time_t now)
Definition: microdesc.c:993
microdescs_add_list_to_cache
smartlist_t * microdescs_add_list_to_cache(microdesc_cache_t *cache, smartlist_t *descriptors, saved_location_t where, int no_save)
Definition: microdesc.c:383
microdesc_free_
void microdesc_free_(microdesc_t *md, const char *fname, int line)
Definition: microdesc.c:866
microdesc_cache_clear
void microdesc_cache_clear(microdesc_cache_t *cache)
Definition: microdesc.c:465
microdesc_check_counts
void microdesc_check_counts(void)
Definition: microdesc.c:844
we_fetch_microdescriptors
int we_fetch_microdescriptors(const or_options_t *options)
Definition: microdesc.c:1064
microdesc_cache_clean
void microdesc_cache_clean(microdesc_cache_t *cache, time_t cutoff, int force)
Definition: microdesc.c:572
MOCK_DECL
#define MOCK_DECL(rv, funcname, arglist)
Definition: testsupport.h:127
saved_location_t
saved_location_t
Definition: or.h:627
microdesc_free_all
void microdesc_free_all(void)
Definition: microdesc.c:928
microdesc_cache_reload
int microdesc_cache_reload(microdesc_cache_t *cache)
Definition: microdesc.c:515
microdesc_cache_rebuild
int microdesc_cache_rebuild(microdesc_cache_t *cache, int force)
Definition: microdesc.c:705
microdesc_cache_t
Definition: microdesc.c:48
microdesc_relay_is_outdated_dirserver
int microdesc_relay_is_outdated_dirserver(const char *relay_digest)
Definition: microdesc.c:163
microdesc_cache_lookup_by_digest256
microdesc_t * microdesc_cache_lookup_by_digest256(microdesc_cache_t *cache, const char *d)
Definition: microdesc.c:946
usable_consensus_flavor
int usable_consensus_flavor(void)
Definition: microdesc.c:1086
get_microdesc_cache
microdesc_cache_t * get_microdesc_cache(void)
Definition: microdesc.c:251
or_options_t
Definition: or_options_st.h:64
update_microdescs_from_networkstatus
void update_microdescs_from_networkstatus(time_t now)
Definition: microdesc.c:1033
microdesc_note_outdated_dirserver
void microdesc_note_outdated_dirserver(const char *relay_digest)
Definition: microdesc.c:111
networkstatus_t
Definition: networkstatus_st.h:26
smartlist_t
Definition: smartlist_core.h:26
we_use_microdescriptors_for_circuits
int we_use_microdescriptors_for_circuits(const or_options_t *options)
Definition: microdesc.c:1055
microdesc_list_missing_digest256
smartlist_t * microdesc_list_missing_digest256(networkstatus_t *ns, microdesc_cache_t *cache, int downloadable_only, digest256map_t *skip)
Definition: microdesc.c:961