diff options
author | George Kadianakis <desnacked@riseup.net> | 2014-06-25 15:44:36 -0400 |
---|---|---|
committer | George Kadianakis <desnacked@riseup.net> | 2014-06-25 15:44:36 -0400 |
commit | 8bbb217964a8d3a2d77a69f670a53ff65643ff27 (patch) | |
tree | d6da1b6b9dcaa51c3136261ef0acca18444c298b /src/or/entrynodes.h | |
parent | 46d41e6e9b4208b1a951f2d7f14da92606b82195 (diff) | |
download | tor-8bbb217964a8d3a2d77a69f670a53ff65643ff27.tar.gz tor-8bbb217964a8d3a2d77a69f670a53ff65643ff27.zip |
Change the interface of entry_is_live() to take a bitmap.
Diffstat (limited to 'src/or/entrynodes.h')
-rw-r--r-- | src/or/entrynodes.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h index afbe9e962b..81f8b9c2a5 100644 --- a/src/or/entrynodes.h +++ b/src/or/entrynodes.h @@ -92,10 +92,18 @@ STATIC int decide_num_guards(const or_options_t *options, int for_directory); STATIC void entry_guards_set_from_config(const or_options_t *options); +/** Flags to be passed to entry_is_live() to indicate what kind of + * entry nodes we are looking for. */ +typedef enum { + ENTRY_NEED_UPTIME = 1<<0, + ENTRY_NEED_CAPACITY = 1<<1, + ENTRY_ASSUME_REACHABLE = 1<<2, + ENTRY_NEED_DESCRIPTOR = 1<<3, +} entry_is_live_flags_t; + STATIC INLINE const node_t *entry_is_live(const entry_guard_t *e, - int need_uptime, int need_capacity, - int assume_reachable, - int need_descriptor,const char **msg); + entry_is_live_flags_t flags, + const char **msg); #endif void remove_all_entry_guards(void); |