tor
master
|
#include <or.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?
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.
char identity[DIGEST_LEN] |
unsigned int ipv6_preferred |
True if the IPv6 OR port is preferred over the IPv4 OR port. XX/teor - can this become out of date if the torrc changes?
unsigned int is_bad_exit |
Do we think this exit is censored, borked, or otherwise nasty?
unsigned int is_exit |
Do we think this is an OK exit?
unsigned int is_hs_dir |
True iff this router is a hidden service directory according to the authorities.
unsigned int is_possible_guard |
Do we think this is a stable OR? Do we think this is an OK guard?
unsigned int is_running |
As far as we know, is this OR currently running?
unsigned int is_stable |
Do we think this is a fast OR?
unsigned int is_valid |
Has a trusted dirserver validated this OR? (For Authdir: Have we validated this OR?)
time_t last_reachable |
When was the last time we could reach this OR?
unsigned int name_lookup_warned |
Have we warned the user for referring to this (unnamed) router by nickname?
int nodelist_idx |
Position of the node within the list of nodes
unsigned int rejects_all |
Local info: we treat this node as if it rejects everything