tor  master
Public Member Functions | Data Fields
node_t Struct Reference

#include <or.h>

Collaboration diagram for node_t:
Collaboration graph
[legend]

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_tmd
 
routerinfo_tri
 
routerstatus_trs
 
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
 

Detailed Description

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.

Member Function Documentation

◆ HT_ENTRY() [1/2]

HT_ENTRY ( node_t  )

Used to look up the node_t by its identity digest.

◆ HT_ENTRY() [2/2]

HT_ENTRY ( node_t  )

Used to look up the node_t by its ed25519 identity digest.

Field Documentation

◆ country

country_t country

According to the geoip db what country is this router in?

◆ 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.

◆ identity

char identity[DIGEST_LEN]

The identity digest of this node_t. No more than one node_t per identity may exist at a time.

◆ ipv6_preferred

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?

◆ is_bad_exit

unsigned int is_bad_exit

Do we think this exit is censored, borked, or otherwise nasty?

◆ is_exit

unsigned int is_exit

Do we think this is an OK exit?

◆ is_hs_dir

unsigned int is_hs_dir

True iff this router is a hidden service directory according to the authorities.

◆ is_possible_guard

unsigned int is_possible_guard

Do we think this is a stable OR? Do we think this is an OK guard?

◆ is_running

unsigned int is_running

As far as we know, is this OR currently running?

◆ is_stable

unsigned int is_stable

Do we think this is a fast OR?

◆ is_valid

unsigned int is_valid

Has a trusted dirserver validated this OR? (For Authdir: Have we validated this OR?)

◆ last_reachable

time_t last_reachable

When was the last time we could reach this OR?

◆ name_lookup_warned

unsigned int name_lookup_warned

Have we warned the user for referring to this (unnamed) router by nickname?

◆ nodelist_idx

int nodelist_idx

Position of the node within the list of nodes

◆ rejects_all

unsigned int rejects_all

Local info: we treat this node as if it rejects everything


The documentation for this struct was generated from the following file: