tor  0.4.1.1-alpha-dev
node_st.h
1 /* Copyright (c) 2001 Matej Pfajfar.
2  * Copyright (c) 2001-2004, Roger Dingledine.
3  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4  * Copyright (c) 2007-2019, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 #ifndef NODE_ST_H
8 #define NODE_ST_H
9 
10 #include "feature/hs/hsdir_index_st.h"
12 
28 struct node_t {
29  /* Indexing information */
30 
32  HT_ENTRY(node_t) ht_ent;
34  HT_ENTRY(node_t) ed_ht_ent;
37 
41 
48 
49  microdesc_t *md;
50  routerinfo_t *ri;
51  routerstatus_t *rs;
52 
53  /* local info: copied from routerstatus, then possibly frobbed based
54  * on experience. Authorities set this stuff directly. Note that
55  * these reflect knowledge of the primary (IPv4) OR port only. */
56 
57  unsigned int is_running:1;
59  unsigned int is_valid:1;
61  unsigned int is_fast:1;
62  unsigned int is_stable:1;
63  unsigned int is_possible_guard:1;
64  unsigned int is_exit:1;
65  unsigned int is_bad_exit:1;
67  unsigned int is_hs_dir:1;
70  /* Local info: warning state. */
71 
72  unsigned int name_lookup_warned:1;
77  unsigned int rejects_all:1;
78 
79  /* Local info: derived. */
80 
83  unsigned int ipv6_preferred:1;
84 
86  /* XXXprop186 what is this suppose to mean with multiple OR ports? */
87  country_t country;
88 
89  /* The below items are used only by authdirservers for
90  * reachability testing. */
91 
93  time_t last_reachable; /* IPv4. */
94  time_t last_reachable6; /* IPv6. */
95 
96  /* Hidden service directory index data. This is used by a service or client
97  * in order to know what's the hs directory index for this node at the time
98  * the consensus is set. */
99  struct hsdir_index_t hsdir_index;
100 };
101 
102 #endif
Definition: node_st.h:28
unsigned int name_lookup_warned
Definition: node_st.h:72
unsigned int is_possible_guard
Definition: node_st.h:63
unsigned int is_stable
Definition: node_st.h:62
unsigned int rejects_all
Definition: node_st.h:77
unsigned int is_valid
Definition: node_st.h:59
HT_ENTRY(node_t) ht_ent
unsigned int is_exit
Definition: node_st.h:64
unsigned int is_running
Definition: node_st.h:57
unsigned int is_hs_dir
Definition: node_st.h:67
#define DIGEST_LEN
Definition: digest_sizes.h:20
char identity[DIGEST_LEN]
Definition: node_st.h:40
time_t last_reachable
Definition: node_st.h:93
Header for crypto_ed25519.c.
country_t country
Definition: node_st.h:87
unsigned int ipv6_preferred
Definition: node_st.h:83
int nodelist_idx
Definition: node_st.h:36
unsigned int is_bad_exit
Definition: node_st.h:65
ed25519_public_key_t ed25519_id
Definition: node_st.h:47