Tor  0.4.6.0-alpha-dev
rend_intro_point_st.h
Go to the documentation of this file.
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-2020, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 /**
8  * @file rend_intro_point_st.h
9  * @brief v2 hidden service introduction point structure.
10  **/
11 
12 #ifndef REND_INTRO_POINT_ST_H
13 #define REND_INTRO_POINT_ST_H
14 
15 struct replaycache_t;
16 struct crypto_pk_t;
17 
18 /** Introduction point information. Used both in rend_service_t (on
19  * the service side) and in rend_service_descriptor_t (on both the
20  * client and service side). */
22  extend_info_t *extend_info; /**< Extend info for connecting to this
23  * introduction point via a multi-hop path. */
24  struct crypto_pk_t *intro_key; /**< Introduction key that replaces the
25  * service key, if this descriptor is V2. */
26 
27  /** (Client side only) Flag indicating that a timeout has occurred
28  * after sending an INTRODUCE cell to this intro point. After a
29  * timeout, an intro point should not be tried again during the same
30  * hidden service connection attempt, but it may be tried again
31  * during a future connection attempt. */
32  unsigned int timed_out : 1;
33 
34  /** (Client side only) The number of times we have failed to build a
35  * circuit to this intro point for some reason other than our
36  * circuit-build timeout. See also MAX_INTRO_POINT_REACHABILITY_FAILURES. */
37  unsigned int unreachable_count : 3;
38 
39  /** (Service side only) Flag indicating that this intro point was
40  * included in the last HS descriptor we generated. */
41  unsigned int listed_in_last_desc : 1;
42 
43  /** (Service side only) A replay cache recording the RSA-encrypted parts
44  * of INTRODUCE2 cells this intro point's circuit has received. This is
45  * used to prevent replay attacks. */
46  struct replaycache_t *accepted_intro_rsa_parts;
47 
48  /** (Service side only) Count of INTRODUCE2 cells accepted from this
49  * intro point.
50  */
52 
53  /** (Service side only) Maximum number of INTRODUCE2 cells that this IP
54  * will accept. This is a random value between
55  * INTRO_POINT_MIN_LIFETIME_INTRODUCTIONS and
56  * INTRO_POINT_MAX_LIFETIME_INTRODUCTIONS. */
58 
59  /** (Service side only) The time at which this intro point was first
60  * published, or -1 if this intro point has not yet been
61  * published. */
63 
64  /** (Service side only) The time at which this intro point should
65  * (start to) expire, or -1 if we haven't decided when this intro
66  * point should expire. */
68 
69  /** (Service side only) The amount of circuit creation we've made to this
70  * intro point. This is incremented every time we do a circuit relaunch on
71  * this object which is triggered when the circuit dies but the node is
72  * still in the consensus. After MAX_INTRO_POINT_CIRCUIT_RETRIES, we give
73  * up on it. */
74  unsigned int circuit_retries;
75 
76  /** (Service side only) Set if this intro point has an established circuit
77  * and unset if it doesn't. */
78  unsigned int circuit_established:1;
79 };
80 
81 #endif /* !defined(REND_INTRO_POINT_ST_H) */
rend_intro_point_t::intro_key
struct crypto_pk_t * intro_key
Definition: rend_intro_point_st.h:24
rend_intro_point_t::circuit_retries
unsigned int circuit_retries
Definition: rend_intro_point_st.h:74
rend_intro_point_t::circuit_established
unsigned int circuit_established
Definition: rend_intro_point_st.h:78
rend_intro_point_t::accepted_intro_rsa_parts
struct replaycache_t * accepted_intro_rsa_parts
Definition: rend_intro_point_st.h:46
rend_intro_point_t::extend_info
extend_info_t * extend_info
Definition: rend_intro_point_st.h:22
rend_intro_point_t::time_published
time_t time_published
Definition: rend_intro_point_st.h:62
rend_intro_point_t::unreachable_count
unsigned int unreachable_count
Definition: rend_intro_point_st.h:37
rend_intro_point_t::timed_out
unsigned int timed_out
Definition: rend_intro_point_st.h:32
rend_intro_point_t
Definition: rend_intro_point_st.h:21
rend_intro_point_t::accepted_introduce2_count
int accepted_introduce2_count
Definition: rend_intro_point_st.h:51
rend_intro_point_t::listed_in_last_desc
unsigned int listed_in_last_desc
Definition: rend_intro_point_st.h:41
crypto_pk_t
Definition: crypto_rsa_nss.c:37
rend_intro_point_t::time_to_expire
time_t time_to_expire
Definition: rend_intro_point_st.h:67
rend_intro_point_t::max_introductions
int max_introductions
Definition: rend_intro_point_st.h:57
extend_info_t
Definition: extend_info_st.h:27