tor  0.4.2.1-alpha-dev
routerinfo_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 ROUTERINFO_ST_H
8 #define ROUTERINFO_ST_H
9 
10 #include "feature/nodelist/signed_descriptor_st.h"
11 
13 
15 struct routerinfo_t {
16  signed_descriptor_t cache_info;
17  char *nickname;
19  uint32_t addr;
20  uint16_t or_port;
21  uint16_t dir_port;
24  /* XXXXX187 Actually these should probably be part of a list of addresses,
25  * not just a special case. Use abstractions to access these; don't do it
26  * directly. */
28  uint16_t ipv6_orport;
29 
34  char *onion_pkey;
37 
44 
45  char *platform;
47  char *protocol_list;
50  /* link info */
51  uint32_t bandwidthrate;
53  uint32_t bandwidthburst;
61  long uptime;
64  char *contact_info;
65  unsigned int is_hibernating:1;
67  unsigned int caches_extra_info:1;
69  unsigned int allow_single_hop_exits:1;
72  unsigned int wants_to_be_hs_dir:1;
74  unsigned int policy_is_reject_star:1;
78  unsigned int needs_retest_if_added:1;
79 
84 
87  unsigned int omit_from_vote:1;
88 
91 
95 #define ROUTER_PURPOSE_GENERAL 0
96 
99 #define ROUTER_PURPOSE_CONTROLLER 1
100 
103 #define ROUTER_PURPOSE_BRIDGE 2
104 
106 #define ROUTER_PURPOSE_UNKNOWN 255
107 
112  uint8_t purpose;
113 };
114 
115 #endif /* !defined(ROUTERINFO_ST_H) */
struct curve25519_public_key_t * onion_curve25519_pkey
Definition: routerinfo_st.h:40
char * contact_info
Definition: routerinfo_st.h:64
unsigned int policy_is_reject_star
Definition: routerinfo_st.h:74
protover_summary_flags_t pv
Definition: routerinfo_st.h:90
unsigned int needs_retest_if_added
Definition: routerinfo_st.h:78
unsigned int supports_tunnelled_dir_requests
Definition: routerinfo_st.h:83
uint32_t bandwidthburst
Definition: routerinfo_st.h:53
smartlist_t * declared_family
Definition: routerinfo_st.h:62
time_t cert_expiration_time
Definition: routerinfo_st.h:43
uint32_t bandwidthrate
Definition: routerinfo_st.h:51
unsigned int wants_to_be_hs_dir
Definition: routerinfo_st.h:72
unsigned int caches_extra_info
Definition: routerinfo_st.h:67
smartlist_t * exit_policy
Definition: routerinfo_st.h:56
unsigned int allow_single_hop_exits
Definition: routerinfo_st.h:69
size_t onion_pkey_len
Definition: routerinfo_st.h:36
char * onion_pkey
Definition: routerinfo_st.h:34
struct short_policy_t * ipv6_exit_policy
Definition: routerinfo_st.h:60
char * protocol_list
Definition: routerinfo_st.h:47
char * nickname
Definition: routerinfo_st.h:17
uint16_t dir_port
Definition: routerinfo_st.h:21
uint32_t bandwidthcapacity
Definition: routerinfo_st.h:55
uint32_t addr
Definition: routerinfo_st.h:19
unsigned int omit_from_vote
Definition: routerinfo_st.h:87
char * platform
Definition: routerinfo_st.h:45
uint8_t purpose
unsigned int is_hibernating
Definition: routerinfo_st.h:65
tor_addr_t ipv6_addr
Definition: routerinfo_st.h:27
crypto_pk_t * identity_pkey
Definition: routerinfo_st.h:38
uint16_t or_port
Definition: routerinfo_st.h:20