diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-06-15 13:13:33 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-06-15 13:13:33 -0400 |
commit | d2942d127da454a1ffb69da176582b5d74918bb1 (patch) | |
tree | be2cd7b9196cc9f31de918624946dbab41183185 /src/or/nodelist.c | |
parent | 8b7df723596d068cbf91abf7535651ab8445810b (diff) | |
download | tor-d2942d127da454a1ffb69da176582b5d74918bb1.tar.gz tor-d2942d127da454a1ffb69da176582b5d74918bb1.zip |
Extract node_t into its own header.
Diffstat (limited to 'src/or/nodelist.c')
-rw-r--r-- | src/or/nodelist.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/nodelist.c b/src/or/nodelist.c index 4d67904c81..2c78c35ab5 100644 --- a/src/or/nodelist.c +++ b/src/or/nodelist.c @@ -69,6 +69,7 @@ #include "dirauth/mode.h" #include "dir_server_st.h" +#include "node_st.h" static void nodelist_drop_node(node_t *node, int remove_from_ht); #define node_free(val) \ @@ -634,6 +635,14 @@ nodelist_set_consensus(networkstatus_t *ns) } } +/** Return 1 iff <b>node</b> has Exit flag and no BadExit flag. + * Otherwise, return 0. + */ +int node_is_good_exit(const node_t *node) +{ + return node->is_exit && ! node->is_bad_exit; +} + /** Helper: return true iff a node has a usable amount of information*/ static inline int node_is_usable(const node_t *node) |