summaryrefslogtreecommitdiff
path: root/src/or/nodelist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-06-15 13:13:33 -0400
committerNick Mathewson <nickm@torproject.org>2018-06-15 13:13:33 -0400
commitd2942d127da454a1ffb69da176582b5d74918bb1 (patch)
treebe2cd7b9196cc9f31de918624946dbab41183185 /src/or/nodelist.c
parent8b7df723596d068cbf91abf7535651ab8445810b (diff)
downloadtor-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.c9
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)