Tor
0.4.7.0-alpha-dev
|
#include <node_st.h>
Public Member Functions | |
HT_ENTRY (node_t) ht_ent | |
HT_ENTRY (node_t) ed_ht_ent | |
Data Fields | |
int | nodelist_idx |
char | identity [DIGEST_LEN] |
ed25519_public_key_t | ed25519_id |
microdesc_t * | md |
routerinfo_t * | ri |
routerstatus_t * | rs |
unsigned int | is_running:1 |
unsigned int | is_valid:1 |
unsigned int | is_fast:1 |
unsigned int | is_stable:1 |
unsigned int | is_possible_guard:1 |
unsigned int | is_exit:1 |
unsigned int | is_bad_exit:1 |
unsigned int | is_hs_dir:1 |
unsigned int | name_lookup_warned:1 |
unsigned int | rejects_all:1 |
unsigned int | ipv6_preferred:1 |
country_t | country |
time_t | last_reachable |
time_t | last_reachable6 |
struct hsdir_index_t | hsdir_index |
A node_t represents a Tor router.
Specifically, a node_t is a Tor router as we are using it: a router that we are considering for circuits, connections, and so on. A node_t is a thin wrapper around the routerstatus, routerinfo, and microdesc for a single router, and provides a consistent interface for all of them.
Also, a node_t has mutable state. While a routerinfo, a routerstatus, and a microdesc have[*] only the information read from a router descriptor, a consensus entry, and a microdescriptor (respectively)... a node_t has flags based on our own current opinion of the node.
[*] Actually, there is some leftover information in each that is mutable. We should try to excise that.
country_t country |
According to the geoip db what country is this router in?
Definition at line 92 of file node_st.h.
Referenced by node_addrs_changed(), nodelist_set_routerinfo(), and routerset_contains_node().
ed25519_public_key_t ed25519_id |
The ed25519 identity of this node_t. This field is nonzero iff we currently have an ed25519 identity for this node in either md or ri, and this node has been inserted to the ed25519-to-node map in the nodelist.
Definition at line 53 of file node_st.h.
Referenced by node_add_to_ed25519_map(), and node_remove_from_ed25519_map().
char identity[DIGEST_LEN] |
The identity digest of this node_t. No more than one node_t per identity may exist at a time.
Definition at line 46 of file node_st.h.
Referenced by connection_ap_can_use_exit(), node_describe(), node_get_rsa_id_digest(), node_get_verbose_nickname(), node_is_me(), node_is_possible_guard(), node_nickname_matches(), nodelist_add_node_and_family(), nodelist_assert_ok(), router_counts_toward_thresholds(), routerlist_add_node_and_family(), and service_desc_note_upload().
unsigned int ipv6_preferred |
unsigned int is_bad_exit |
Do we think this exit is censored, borked, or otherwise nasty?
Definition at line 71 of file node_st.h.
Referenced by dirserv_set_node_flags_from_authoritative_status(), and node_is_good_exit().
unsigned int is_exit |
Do we think this is an OK exit?
Definition at line 70 of file node_st.h.
Referenced by node_is_good_exit().
unsigned int is_hs_dir |
True iff this router is a hidden service directory according to the authorities.
Definition at line 73 of file node_st.h.
Referenced by dirauth_set_routerstatus_from_routerinfo().
unsigned int is_possible_guard |
Do we think this is a stable OR? Do we think this is an OK guard?
Definition at line 69 of file node_st.h.
Referenced by node_is_possible_guard(), and node_is_unreliable().
unsigned int is_running |
As far as we know, is this OR currently running?
Definition at line 63 of file node_st.h.
Referenced by mark_all_dirservers_up(), router_exit_policy_all_nodes_reject(), router_find_exact_exit_enclave(), and router_is_active().
unsigned int is_stable |
Do we think this is a fast OR?
Definition at line 68 of file node_st.h.
Referenced by dirauth_set_routerstatus_from_routerinfo(), node_is_possible_guard(), and node_is_unreliable().
unsigned int is_valid |
Has a trusted dirserver validated this OR? (For Authdir: Have we validated this OR?)
Definition at line 65 of file node_st.h.
Referenced by dirserv_set_node_flags_from_authoritative_status(), node_is_possible_guard(), and router_is_active().
time_t last_reachable |
When was the last time we could reach this OR?
Definition at line 98 of file node_st.h.
Referenced by node_addrs_changed().
unsigned int name_lookup_warned |
Have we warned the user for referring to this (unnamed) router by nickname?
Definition at line 78 of file node_st.h.
Referenced by networkstatus_reset_warnings().
int nodelist_idx |
Position of the node within the list of nodes
Definition at line 42 of file node_st.h.
Referenced by node_free_(), and nodelist_drop_node().
unsigned int rejects_all |
Local info: we treat this node as if it rejects everything
Definition at line 83 of file node_st.h.
Referenced by compare_tor_addr_to_node_policy(), node_exit_policy_rejects_all(), and policies_set_node_exitpolicy_to_reject_all().