diff options
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); |